Class SftpFileObject.SftpOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    Enclosing class:
    SftpFileObject

    private class SftpFileObject.SftpOutputStream
    extends MonitorOutputStream
    An OutputStream that wraps an sftp OutputStream, and closes the channel when the stream is closed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.jcraft.jsch.ChannelSftp channel  
      • Fields inherited from class java.io.BufferedOutputStream

        buf, count
      • Fields inherited from class java.io.FilterOutputStream

        out
    • Constructor Summary

      Constructors 
      Constructor Description
      SftpOutputStream​(com.jcraft.jsch.ChannelSftp channel, java.io.OutputStream out)  
    • Field Detail

      • channel

        private final com.jcraft.jsch.ChannelSftp channel
    • Constructor Detail

      • SftpOutputStream

        public SftpOutputStream​(com.jcraft.jsch.ChannelSftp channel,
                                java.io.OutputStream out)
    • Method Detail

      • onClose

        protected void onClose()
                        throws java.io.IOException
        Called after this stream is closed.
        Overrides:
        onClose in class MonitorOutputStream
        Throws:
        java.io.IOException - if an error occurs.