@Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); } @Override
@Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); } @Override
private InputStream getOriginalInputStream() { try { return originalSource.getInputStream(); } catch (IOException e) { throw new ConfigurationPointException("Failed to read text of schema file: " + getName() + ", source=" + originalSource, e); } }
private InputStream getOriginalInputStream() { try { return originalSource.getInputStream(); } catch (IOException e) { throw new ConfigurationPointException("Failed to read text of schema file: " + getName() + ", source=" + originalSource, e); } }
private InputStream getOriginalInputStream() { try { return originalSource.getInputStream(); } catch (IOException e) { throw new ConfigurationPointException("Failed to read text of schema file: " + getName() + ", source=" + originalSource, e); } }
@Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); }
@Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); } @Override
@Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); }
@Override public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); }
public InputStream getInputStream() throws IOException { return inputStreamSource.getInputStream(); }
public void copyContentToPackDir(String contentName, InputStreamSource source) throws PackWriterException{ if (!new File(packDirectory,contentName).getParentFile().exists()) { new File(packDirectory,contentName).getParentFile().mkdirs(); } try { FileUtils.copyInputStreamToFile(source.getInputStream(), new File(packDirectory,contentName)); } catch (IOException ex) { throw new PackWriterException(ex); } }
/** * Read certificate. * * @param resource the resource to read the cert from * @return the x 509 certificate */ public static X509Certificate readCertificate(final InputStreamSource resource) { try (val in = resource.getInputStream()) { return CertUtil.readCertificate(in); } catch (final IOException e) { throw new IllegalArgumentException("Error reading certificate " + resource, e); } }
private InputStream getOriginalInputStream() { try { return originalSource.getInputStream(); } catch (IOException e) { throw new ConfigurationPointException("Failed to read text of schema file: " + getName() + ", source=" + originalSource, e); } }
} else if (target.getClass().isAssignableFrom(InputStreamSource.class)) { try { return (T) new StreamSource(((InputStreamSource)target).getInputStream()); } catch (IOException e) { log.warn("Failed to create stream source from object", e);