|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.enterprisedt.net.ftp.FileTransferInputStream
com.enterprisedt.net.ftp.FTPInputStream
public class FTPInputStream
Represents an input stream of bytes coming from an FTP server, permitting the user to download a file by reading the stream. It can only be used for one download, i.e. after the stream is closed it cannot be reopened.
Field Summary |
---|
Fields inherited from class com.enterprisedt.net.ftp.FileTransferInputStream |
---|
closed, remoteFile |
Constructor Summary | |
---|---|
FTPInputStream(FTPClient client,
java.lang.String remoteFile)
Constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.enterprisedt.net.ftp.FileTransferInputStream |
---|
getRemoteFile |
Methods inherited from class java.io.InputStream |
---|
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FTPInputStream(FTPClient client, java.lang.String remoteFile) throws java.io.IOException, FTPException
client
- connected FTPClient instanceremoteFile
- remote file
java.io.IOException
FTPException
Method Detail |
---|
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 read
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
- if an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |