public class FTPInputStream extends FileTransferInputStream
| Constructor and Description |
|---|
FTPInputStream(FTPClient client,
java.lang.String remoteFile)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this input stream and releases any system resources associated
with the stream.
|
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream into an array of bytes.
|
void |
setMonitor(FTPProgressMonitorEx monitor,
long monitorInterval)
The input stream uses the progress monitor currently owned by the FTP client.
|
getRemoteFilepublic FTPInputStream(FTPClient client, java.lang.String remoteFile) throws java.io.IOException, FTPException
client - connected FTPClient instanceremoteFile - remote filejava.io.IOExceptionFTPExceptionpublic void setMonitor(FTPProgressMonitorEx monitor, long monitorInterval)
monitor - progress monitor referencemonitorInterval - public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamb - array to read intooff - offset into the array to start atlen - the number of bytes to be readjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.