Class FileTransferInputStream

java.lang.Object
java.io.InputStream
com.enterprisedt.net.ftp.FileTransferInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
AbstractFTPInputStream, FTPInputStream

public abstract class FileTransferInputStream extends InputStream
Super class of all input streams supported
Version:
$Revision$
Author:
Bruce Blackshaw
  • Field Details

    • remoteFile

      protected String remoteFile
      Name of remote file being transferred
    • closed

      protected boolean closed
      Has the stream been closed?
    • monitorInterval

      protected long monitorInterval
      Interval that we notify the monitor of progress
    • pos

      protected long pos
      Byte position in file
    • monitorCount

      protected long monitorCount
      Count of byte since last the progress monitor was notified.
    • monitor

      protected FTPProgressMonitor monitor
      Progress monitor reference
    • monitorEx

      protected FTPProgressMonitorEx monitorEx
      Progress monitor reference
    • started

      protected boolean started
      Flag to indicated we've started downloading
  • Constructor Details

    • FileTransferInputStream

      public FileTransferInputStream()
  • Method Details

    • getRemoteFile

      public String getRemoteFile()
      Get the name of the remote file
      Returns:
      remote filename
    • setMonitor

      public void setMonitor(FTPProgressMonitorEx monitor, long monitorInterval)
      The input stream uses the progress monitor currently owned by the FTP client. This method allows a different progress monitor to be passed in, or for the monitor interval to be altered.
      Parameters:
      monitor - progress monitor reference
      monitorInterval -
    • checkMonitor

      protected void checkMonitor()
      Check if time to invoke the monitor