Package org.apache.sshd.common.channel
Class ChannelOutputStream
java.lang.Object
java.io.OutputStream
org.apache.sshd.common.channel.ChannelOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,Channel,ChannelHolder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumprotected static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Bufferprivate intprivate final Objectprivate final AbstractChannelprivate final byteprivate final booleanprivate booleanprivate intprotected final org.slf4j.Loggerprivate final Durationprivate final AtomicBooleanprotected final AtomicReference<ChannelOutputStream.OpenState> private final ChannelStreamWriterprivate final RemoteWindow -
Constructor Summary
ConstructorsConstructorDescriptionChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, Duration maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
Method Summary
Methods inherited from class java.io.OutputStream
write
-
Field Details
-
openState
-
log
protected final org.slf4j.Logger log -
channelInstance
-
packetWriter
-
remoteWindow
-
maxWaitTimeout
-
cmd
private final byte cmd -
eofOnClose
private final boolean eofOnClose -
noDelay
-
bufferLock
-
buffer
-
bufferLength
private int bufferLength -
lastSize
private int lastSize -
isFlushing
private boolean isFlushing
-
-
Constructor Details
-
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, Duration maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
-
-
Method Details
-
getChannel
- Specified by:
getChannelin interfaceChannelHolder- Returns:
- The associated
Channelinstance
-
getCommandType
public byte getCommandType()- Returns:
- Either
SSH_MSG_CHANNEL_DATAorSSH_MSG_CHANNEL_EXTENDED_DATAindicating the output stream type
-
isEofOnClose
public boolean isEofOnClose() -
isNoDelay
public boolean isNoDelay() -
setNoDelay
public void setNoDelay(boolean noDelay) -
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
-
newBuffer
-
toString
-