public class SFTPInputStream extends InputStream
| Constructor and Description |
|---|
SFTPInputStream(SFTPv3FileHandle handle) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] buffer,
int offset,
int len)
Reads up to
len bytes of data from the input stream into
an array of bytes. |
long |
skip(long n)
Skips over and discards
n bytes of data from this input
stream. |
available, mark, markSupported, read, resetpublic SFTPInputStream(SFTPv3FileHandle handle)
public int read(byte[] buffer,
int offset,
int len)
throws IOException
len bytes of data from the input stream into
an array of bytes. An attempt is made to read as many as
len bytes, but a smaller number may be read, possibly
zero. The number of bytes actually read is returned as an integer.read in class InputStreamIOExceptionSFTPv3Client.read(SFTPv3FileHandle,long,byte[],int,int)public int read()
throws IOException
int in the range 0 to
255. If no byte is available because the end of the stream
has been reached, the value -1 is returned. This method
blocks until input data is available, the end of the stream is detected,
or an exception is thrown.
A subclass must provide an implementation of this method.
read in class InputStream-1 if the end of the
stream is reached.IOException - if an I/O error occurs.public long skip(long n)
n bytes of data from this input
stream.skip in class InputStreamn - the number of bytes to be skipped.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2014. All Rights Reserved.