public OutputStream getOutputStream ( String remotefile ) throws SftpStatusException , SshException { String remotePath = resolveRemotePath ( remotefile ) ; return new SftpFileOutputStream ( sftp . openFile ( remotePath , SftpSubsystemChannel . OPEN_CREATE | SftpSubsystemChannel . OPEN_TRUNCATE | SftpSubsystemChannel . OPEN_WRITE ) ) ; }
Create an OutputStream for writing to a remote file .