public class SftpInputStreamWithChannel extends InputStreamWithChannel
Modifier and Type | Field and Description |
---|---|
private int |
available |
private byte[] |
bb |
private byte[] |
buffer |
private SftpClient |
client |
private SftpClient.CloseableHandle |
handle |
private int |
index |
private long |
offset |
private java.lang.String |
path |
Constructor and Description |
---|
SftpInputStreamWithChannel(SftpClient client,
int bufferSize,
java.lang.String path,
java.util.Collection<SftpClient.OpenMode> mode) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
SftpClient |
getClient()
The client instance
|
java.lang.String |
getPath()
The remotely accessed file path
|
boolean |
isOpen() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
private final SftpClient client
private final java.lang.String path
private byte[] bb
private byte[] buffer
private int index
private int available
private SftpClient.CloseableHandle handle
private long offset
public SftpInputStreamWithChannel(SftpClient client, int bufferSize, java.lang.String path, java.util.Collection<SftpClient.OpenMode> mode) throws java.io.IOException
java.io.IOException
public final SftpClient getClient()
SftpClient
instance used to access the remote filepublic final java.lang.String getPath()
public boolean isOpen()
public boolean markSupported()
markSupported
in class java.io.InputStream
public void mark(int readlimit)
mark
in class java.io.InputStream
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
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
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
close
in class java.io.InputStream
java.io.IOException