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 Buffer
private int
private final AbstractChannel
private final AtomicBoolean
private final byte
private final boolean
private int
private final org.slf4j.Logger
private final Duration
private boolean
private final ChannelStreamWriter
private 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
-
channelInstance
-
packetWriter
-
remoteWindow
-
maxWaitTimeout
-
log
private final org.slf4j.Logger log -
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:
getChannel
in interfaceChannelHolder
- Returns:
- The associated
Channel
instance
-
isEofOnClose
public boolean isEofOnClose() -
setNoDelay
public void setNoDelay(boolean noDelay) -
isNoDelay
public boolean isNoDelay() -
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
-
newBuffer
protected void newBuffer(int size) -
toString
-