@ Override public InputStream getInputStream ( ) throws IOException { if ( ! exists ( ) ) { throw new FileNotFoundException ( getPath ( ) + " (no such file or directory)" ) ; } if ( Files . isDirectory ( this . path ) ) { throw new FileNotFoundException ( getPath ( ) + " (is a directory)" ) ; } return Files . newInputStream ( this . path ) ; }
This implementation opens a InputStream for the underlying file .