use of org.apache.jackrabbit.vfs.ext.ds.LazyFileContentInputStream in project jackrabbit by apache.
the class VFSFileSystem method getInputStream.
@Override
public InputStream getInputStream(String filePath) throws FileSystemException {
try {
final FileObject fo = resolveFileObject(filePath);
final FileObject folder = fo.getParent();
if (!folder.exists() || !folder.isFolder()) {
throw new FileSystemException("Folder doesn't exist for " + filePath + ".");
}
return new LazyFileContentInputStream(fo);
} catch (org.apache.commons.vfs2.FileSystemException e) {
final String msg = "Failed to open an input stream from " + filePath + ".";
log.debug(msg, e);
throw new FileSystemException(msg, e);
}
}
Aggregations