public class SftpInputStreamAsync extends org.apache.sshd.common.util.io.InputStreamWithChannel implements SftpClientHolder
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
bb |
protected org.apache.sshd.common.util.buffer.Buffer |
buffer |
protected int |
bufferSize |
protected long |
clientOffset |
protected boolean |
eofIndicator |
protected long |
fileSize |
protected SftpClient.CloseableHandle |
handle |
protected org.slf4j.Logger |
log |
protected Deque<SftpAckData> |
pendingReads |
protected long |
requestOffset |
| Constructor and Description |
|---|
SftpInputStreamAsync(AbstractSftpClient client,
int bufferSize,
long clientOffset,
long fileSize,
String path,
SftpClient.CloseableHandle handle) |
SftpInputStreamAsync(AbstractSftpClient client,
int bufferSize,
String path,
Collection<SftpClient.OpenMode> mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
fillData() |
AbstractSftpClient |
getClient() |
String |
getPath()
The remotely accessed file path
|
protected boolean |
hasNoData() |
boolean |
isEof()
Check if the stream is at EOF
|
boolean |
isOpen() |
protected void |
pollBuffer(SftpAckData ack) |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
protected void |
sendRequests() |
long |
skip(long n) |
String |
toString() |
long |
transferTo(long max,
WritableByteChannel out) |
long |
transferTo(OutputStream out) |
available, mark, markSupported, read, resetprotected final org.slf4j.Logger log
protected final byte[] bb
protected final int bufferSize
protected final long fileSize
protected org.apache.sshd.common.util.buffer.Buffer buffer
protected SftpClient.CloseableHandle handle
protected long requestOffset
protected long clientOffset
protected final Deque<SftpAckData> pendingReads
protected boolean eofIndicator
public SftpInputStreamAsync(AbstractSftpClient client, int bufferSize, String path, Collection<SftpClient.OpenMode> mode) throws IOException
IOExceptionpublic SftpInputStreamAsync(AbstractSftpClient client, int bufferSize, long clientOffset, long fileSize, String path, SftpClient.CloseableHandle handle)
public final AbstractSftpClient getClient()
getClient in interface SftpClientHolderpublic final String getPath()
public boolean isEof()
true if all the data has been consumerpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long transferTo(long max,
WritableByteChannel out)
throws IOException
IOExceptionpublic long transferTo(OutputStream out) throws IOException
IOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionprotected boolean hasNoData()
protected void sendRequests()
throws IOException
IOExceptionprotected void fillData()
throws IOException
IOExceptionprotected void pollBuffer(SftpAckData ack) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface Channelclose in class InputStreamIOExceptionCopyright © 2018–2021 The Apache Software Foundation. All rights reserved.