@ Override public InputStream getFileStream ( String file ) throws FileBasedHelperException { SftpGetMonitor monitor = new SftpGetMonitor ( ) ; try { ChannelSftp channel = getSftpChannel ( ) ; return new SftpFsFileInputStream ( channel . get ( file , monitor ) , channel ) ; } catch ( SftpException e ) { throw new FileBasedHelperException ( "Cannot download file " + file + " due to " + e . getMessage ( ) , e ) ; } }
Executes a get SftpCommand and returns an input stream to the file