public class SftpInputStreamAsync extends InputStreamWithChannel implements SftpClientHolder
Modifier and Type | Field and Description |
---|---|
protected byte[] |
bb |
protected 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 len,
WritableByteChannel out) |
long |
transferTo(OutputStream out) |
available, mark, markSupported, read, reset
protected final org.slf4j.Logger log
protected final byte[] bb
protected final int bufferSize
protected final long fileSize
protected 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
IOException
public SftpInputStreamAsync(AbstractSftpClient client, int bufferSize, long clientOffset, long fileSize, String path, SftpClient.CloseableHandle handle)
public final AbstractSftpClient getClient()
getClient
in interface SftpClientHolder
public final String getPath()
public boolean isEof()
true
if all the data has been consumerpublic int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public long transferTo(long len, WritableByteChannel out) throws IOException
IOException
public long transferTo(OutputStream out) throws IOException
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
protected boolean hasNoData()
protected void sendRequests() throws IOException
IOException
protected void fillData() throws IOException
IOException
protected void pollBuffer(SftpAckData ack) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
close
in class InputStream
IOException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.