Top Description Inners Fields Constructors Methods
org.apache.sshd.common.channel

public Class SimpleIoOutputStream

extends AbstractCloseable
implements IoOutputStream
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.io.IoOutputStream, org.apache.sshd.common.Closeable, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException, org.apache.sshd.common.io.AbstractIoWriteFuture, .IoOutputStream, .IoWriteFuture, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.common.util.closeable.AbstractCloseable, org.apache.sshd.common.util.io.IoUtils

An implementation of IoOutputStream using a synchronous ChannelOutputStream.
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Field Summary

Modifier and TypeField and Description
protected final ChannelOutputStream
Inherited from org.apache.sshd.common.util.closeable.AbstractCloseable:
closeFuturefutureLockstate

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
doCloseImmediately()

Overrides org.apache.sshd.common.util.closeable.AbstractCloseable.doCloseImmediately.

doCloseImmediately is called once and only once with state == Immediate Overriding methods should always call the base implementation.

public IoWriteFuture
writeBuffer(Buffer
the data to write

Note

the buffer must not be touched until the returned write future is completed.

buffer
)

Implements org.apache.sshd.common.io.IoOutputStream.writeBuffer.

Write the given buffer.

Inherited from org.apache.sshd.common.util.closeable.AbstractCloseable:
addCloseFutureListenerbuilderclosedoCloseGracefullygetFutureLockisClosedisClosingpreCloseremoveCloseFutureListener

Field Detail

osback to summary
protected final ChannelOutputStream os

Constructor Detail

SimpleIoOutputStreamback to summary
public SimpleIoOutputStream(ChannelOutputStream os)

Method Detail

doCloseImmediatelyback to summary
protected void doCloseImmediately()

Overrides org.apache.sshd.common.util.closeable.AbstractCloseable.doCloseImmediately.

Doc from org.apache.sshd.common.util.closeable.AbstractCloseable.doCloseImmediately.

doCloseImmediately is called once and only once with state == Immediate Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing

Annotations
@Override
writeBufferback to summary
public IoWriteFuture writeBuffer(Buffer buffer) throws IOException

Implements org.apache.sshd.common.io.IoOutputStream.writeBuffer.

Doc from org.apache.sshd.common.io.IoOutputStream.writeBuffer.

Write the given buffer.

Parameters
buffer:Buffer

the data to write

Note

the buffer must not be touched until the returned write future is completed.

Returns:IoWriteFuture

An IoWriteFuture that can be used to check when the data has actually been written.

Annotations
@Override
Exceptions
IOException:
if an error occurred when writing the data
org.apache.sshd.common.channel back to summary

protected Class SimpleIoOutputStream.DefaultIoWriteFuture

extends AbstractIoWriteFuture
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.apache.sshd.common.io.AbstractIoWriteFuture:
fulfilledgetExceptionisWrittenverify

Constructor Detail

DefaultIoWriteFutureback to summary
public DefaultIoWriteFuture(Object id, Object lock)