/** * This constructor allows to build a CRL source from a list of * <code>InputStream</code>. * * @param inputStreams * the list of <code>InputStream</code> to be loaded as CRL */ public ExternalResourcesCRLSource(final InputStream... inputStreams) { for (final InputStream inputStream : inputStreams) { addCRLToken(inputStream); } }
private void addCRLToken(final InputStream inputStream) { try (InputStream is = inputStream) { addCRLBinary(Utils.toByteArray(is)); } catch (IOException e) { throw new DSSException(e); } }
/** * This constructor allows to build a CRL source from a list of * resource paths. * * @param paths * paths to be loaded as CRL */ public ExternalResourcesCRLSource(final String... paths) { for (final String pathItem : paths) { try { addCRLToken(getClass().getResourceAsStream(pathItem)); } catch (Exception e) { LOG.error("Unable to load '" + pathItem + "'", e); } } }