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.
|
getRemoteFile
public FTPInputStream(FTPClient client, java.lang.String remoteFile) throws java.io.IOException, FTPException
client
- connected FTPClient instanceremoteFile
- remote filejava.io.IOException
FTPException
public void setMonitor(FTPProgressMonitorEx monitor, long monitorInterval)
monitor
- progress monitor referencemonitorInterval
- public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
b
- array to read intooff
- offset into the array to start atlen
- the number of bytes to be readjava.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException
- if an I/O error occurs.