List of usage examples for org.apache.commons.vfs2 FileTypeHasNoContentException FileTypeHasNoContentException
public FileTypeHasNoContentException(final Object info0)
From source file:com.github.songsheng.vfs2.provider.nfs.NfsFileObject.java
/** * Creates an input stream to read the file content from. *///from www. j ava2 s . com @Override protected InputStream doGetInputStream() throws Exception { try { return new XFileInputStream(file); } catch (final Exception e) { if (file.isDirectory()) { throw new FileTypeHasNoContentException(getName()); } else { throw new org.apache.commons.vfs2.FileNotFoundException(getName()); } } }