Package org.apache.sshd.sftp.client.impl
Class SftpOutputStreamAsync
java.lang.Object
java.io.OutputStream
org.apache.sshd.common.util.io.output.OutputStreamWithChannel
org.apache.sshd.sftp.client.impl.SftpOutputStreamAsync
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Channel
,SftpClientHolder
Implements an output stream for a given remote file
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]
protected Buffer
protected final int
private final AbstractSftpClient
protected SftpClient.CloseableHandle
protected final org.slf4j.Logger
protected long
private final String
protected final Deque
<SftpAckData> -
Constructor Summary
ConstructorsConstructorDescriptionSftpOutputStreamAsync
(AbstractSftpClient client, int bufferSize, String path, Collection<SftpClient.OpenMode> mode) SftpOutputStreamAsync
(AbstractSftpClient client, int bufferSize, String path, SftpClient.CloseableHandle handle) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Field Details
-
log
protected final org.slf4j.Logger log -
bb
protected final byte[] bb -
bufferSize
protected final int bufferSize -
buffer
-
handle
-
offset
protected long offset -
pendingWrites
-
clientInstance
-
path
-
-
Constructor Details
-
SftpOutputStreamAsync
public SftpOutputStreamAsync(AbstractSftpClient client, int bufferSize, String path, Collection<SftpClient.OpenMode> mode) throws IOException - Throws:
IOException
-
SftpOutputStreamAsync
public SftpOutputStreamAsync(AbstractSftpClient client, int bufferSize, String path, SftpClient.CloseableHandle handle) throws IOException - Throws:
IOException
-
-
Method Details
-
getClient
- Specified by:
getClient
in interfaceSftpClientHolder
-
setOffset
public void setOffset(long offset) -
getPath
The remotely accessed file path- Returns:
- Remote file path
-
isOpen
public boolean isOpen() -
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
toString
-