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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private Bufferprivate intprivate final AbstractChannelprivate final AtomicBooleanprivate final byteprivate final booleanprivate intprotected final org.slf4j.Loggerprivate final Durationprivate booleanprivate final ChannelStreamWriterprivate final Window -
Constructor Summary
ConstructorsConstructorDescriptionChannelOutputStream(AbstractChannel channel, Window remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) ChannelOutputStream(AbstractChannel channel, Window remoteWindow, Duration maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) ChannelOutputStream(AbstractChannel channel, Window remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Field Details
-
log
protected final org.slf4j.Logger log -
channelInstance
-
packetWriter
-
remoteWindow
-
maxWaitTimeout
-
cmd
private final byte cmd -
eofOnClose
private final boolean eofOnClose -
b
private final byte[] b -
closedState
-
buffer
-
bufferLength
private int bufferLength -
lastSize
private int lastSize -
noDelay
private boolean noDelay
-
-
Constructor Details
-
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, Window remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, Window remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose) -
ChannelOutputStream
public ChannelOutputStream(AbstractChannel channel, Window 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
protected void newBuffer(int size) -
toString
-