|
||||||||||
| 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.ssh.SSHFTPInputStream
public class SSHFTPInputStream
Represents an input stream of bytes coming from an SFTP 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 | |
|---|---|
SSHFTPInputStream(SSHFTPClient 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 SSHFTPClient. |
long |
skip(long n)
Skips over and discards n bytes of data from this input
stream. |
| Methods inherited from class com.enterprisedt.net.ftp.FileTransferInputStream |
|---|
getRemoteFile |
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SSHFTPInputStream(SSHFTPClient client,
java.lang.String remoteFile)
throws java.io.IOException,
FTPException
client - connected SSHFTPClient 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.InputStreamjava.io.IOException
public 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 read
java.io.IOException
public long skip(long n)
throws java.io.IOException
n bytes of data from this input
stream. Not very efficient for ASCII mode, as all data has to be
read from the server.
skip in class java.io.InputStreamn - the number of bytes to be skipped.
java.io.IOException - if an I/O error occurs.
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOException - if an I/O error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||