本文整理了Java中eu.europa.esig.dss.utils.Utils.isArrayEmpty()
方法的一些代码示例,展示了Utils.isArrayEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isArrayEmpty()
方法的具体详情如下:
包路径:eu.europa.esig.dss.utils.Utils
类名称:Utils
方法名:isArrayEmpty
暂无
代码示例来源:origin: esig/dss
@Test
public void isArrayEmptyObj() {
assertTrue(Utils.isArrayEmpty(new Object[] {}));
assertFalse(Utils.isArrayEmpty(new Object[] { null }));
assertFalse(Utils.isArrayEmpty(new Object[] { "1", 1 }));
}
代码示例来源:origin: esig/dss
@Test
public void isArrayEmpty() {
assertTrue(Utils.isArrayEmpty(new byte[] {}));
assertFalse(Utils.isArrayEmpty(new byte[] { 1 }));
}
代码示例来源:origin: esig/dss
try {
final byte[] ocspRespBytes = dataLoader.post(ocspAccessLocation, content);
if (!Utils.isArrayEmpty(ocspRespBytes)) {
final OCSPResp ocspResp = new OCSPResp(ocspRespBytes);
OCSPRespStatus status = OCSPRespStatus.fromInt(ocspResp.getStatus());
代码示例来源:origin: esig/dss
@Test
public void parseCRLWithoutRevokedCertificates() throws IOException {
try (InputStream fis = CRLParserTest.class.getResourceAsStream("/DS_NA2_CA-B1.crl");
BufferedInputStream is = new BufferedInputStream(fis)) {
CRLInfo handler = parser.retrieveInfo(is);
assertEquals("1.2.840.113549.1.1.11", handler.getCertificateListSignatureAlgorithmOid());
assertNotNull(handler.getIssuer());
assertNotNull(handler.getThisUpdate());
assertNotNull(handler.getNextUpdate());
assertTrue(handler.getCriticalExtensions().isEmpty());
assertTrue(!handler.getNonCriticalExtensions().isEmpty());
assertTrue(Utils.isArrayEmpty(handler.getNonCriticalExtension("2.5.29.60")));
assertEquals("1.2.840.113549.1.1.11", handler.getTbsSignatureAlgorithmOid());
byte[] signatureValue = handler.getSignatureValue();
assertTrue(Utils.isArrayNotEmpty(signatureValue));
}
}
代码示例来源:origin: esig/dss
@Test
public void testExtension() throws IOException {
try (InputStream fis = CRLParserTest.class.getResourceAsStream("/crl_with_expiredCertsOnCRL_extension.crl");
BufferedInputStream is = new BufferedInputStream(fis)) {
CRLInfo handler = parser.retrieveInfo(is);
assertEquals("1.2.840.113549.1.1.11", handler.getCertificateListSignatureAlgorithmOid());
assertNotNull(handler.getIssuer());
assertNotNull(handler.getThisUpdate());
assertNotNull(handler.getNextUpdate());
assertTrue(!handler.getCriticalExtensions().isEmpty());
assertTrue(Utils.isArrayNotEmpty(handler.getCriticalExtension("2.5.29.28")));
assertTrue(Utils.isArrayEmpty(handler.getNonCriticalExtension("2.5.29.28")));
assertTrue(!handler.getNonCriticalExtensions().isEmpty());
assertTrue(Utils.isArrayNotEmpty(handler.getNonCriticalExtension("2.5.29.60")));
assertTrue(Utils.isArrayEmpty(handler.getCriticalExtension("2.5.29.60")));
assertEquals("1.2.840.113549.1.1.11", handler.getTbsSignatureAlgorithmOid());
byte[] signatureValue = handler.getSignatureValue();
assertTrue(Utils.isArrayNotEmpty(signatureValue));
}
}
内容来源于网络,如有侵权,请联系作者删除!