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
public class SftpOutputStreamAsync
extends org.apache.sshd.common.util.io.output.OutputStreamWithChannel
implements SftpClientHolder
Implements an output stream for a given remote file
- Author:
- Apache MINA SSHD Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byte[]protected org.apache.sshd.common.util.buffer.Bufferprotected final intprotected SftpClient.CloseableHandleprotected final org.slf4j.Loggerprotected longprotected 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
protected org.apache.sshd.common.util.buffer.Buffer buffer -
handle
-
offset
protected long offset -
pendingWrites
-
-
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:
getClientin interfaceSftpClientHolder
-
setOffset
public void setOffset(long offset) -
getPath
The remotely accessed file path- Returns:
- Remote file path
-
isOpen
public boolean isOpen() -
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
toString
-