public InputStream getInputStream()

in src/main/java/org/apache/sling/scripting/java/impl/SlingIOProvider.java [108:125]


    public InputStream getInputStream(String fileName) throws FileNotFoundException, IOException {
        try {
            final Resource resource = getResourceInternal(fileName);
            if (resource == null) {
                throw new FileNotFoundException("Cannot find " + fileName);
            }

            final InputStream stream = resource.adaptTo(InputStream.class);
            if (stream == null) {
                throw new FileNotFoundException("Cannot find " + fileName);
            }

            return stream;

        } catch (SlingException se) {
            throw (IOException) new IOException("Failed to get InputStream for " + fileName).initCause(se);
        }
    }