Interface ScpSourceStreamResolver

    • Method Detail

      • getSize

        long getSize()
              throws IOException
        Returns:
        An estimated size of the expected number of bytes to be uploaded. If non-positive then assumed to be unknown.
        Throws:
        IOException - If failed to generate an estimate
      • closeSourceStream

        default void closeSourceStream​(Session session,
                                       long fileSize,
                                       Set<PosixFilePermission> permissions,
                                       InputStream stream)
                                throws IOException
        Called when the stream obtained from resolveSourceStream is no longer needed since since file copy was completed successfully.
        Parameters:
        session - The Session through which file is transmitted
        fileSize - The expected transfer byte count
        permissions - The requested file permissions
        stream - The InputStream to close
        Throws:
        IOException - If failed to close the stream - Note: stream will be closed regardless of whether this method throws an exception or not.