Package com.enterprisedt.net.ftp
Class FileTransferInputStream
java.lang.Object
java.io.InputStream
com.enterprisedt.net.ftp.FileTransferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
AbstractFTPInputStream,FTPInputStream
Super class of all input streams supported
- Version:
- $Revision$
- Author:
- Bruce Blackshaw
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanHas the stream been closed?protected FTPProgressMonitorProgress monitor referenceprotected longCount of byte since last the progress monitor was notified.protected FTPProgressMonitorExProgress monitor referenceprotected longInterval that we notify the monitor of progressprotected longByte position in fileprotected StringName of remote file being transferredprotected booleanFlag to indicated we've started downloading -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCheck if time to invoke the monitorGet the name of the remote filevoidsetMonitor(FTPProgressMonitorEx monitor, long monitorInterval) The input stream uses the progress monitor currently owned by the FTP client.Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
remoteFile
Name of remote file being transferred -
closed
protected boolean closedHas the stream been closed? -
monitorInterval
protected long monitorIntervalInterval that we notify the monitor of progress -
pos
protected long posByte position in file -
monitorCount
protected long monitorCountCount of byte since last the progress monitor was notified. -
monitor
Progress monitor reference -
monitorEx
Progress monitor reference -
started
protected boolean startedFlag to indicated we've started downloading
-
-
Constructor Details
-
FileTransferInputStream
public FileTransferInputStream()
-
-
Method Details
-
getRemoteFile
Get the name of the remote file- Returns:
- remote filename
-
setMonitor
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 referencemonitorInterval-
-
checkMonitor
protected void checkMonitor()Check if time to invoke the monitor
-