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
- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static enum
protected static enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.slf4j.Logger
protected final AtomicReference<ChannelOutputStream.OpenState>
-
Constructor Summary
ConstructorDescriptionChannelOutputStream
(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
nullOutputStream, write
-
Field Details
-
openState
-
log
protected final org.slf4j.Logger log
-
-
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:
getChannel
in interfaceChannelHolder
- Returns:
- The associated
Channel
instance
-
getCommandType
public byte getCommandType()- Returns:
- Either
SSH_MSG_CHANNEL_DATA
orSSH_MSG_CHANNEL_EXTENDED_DATA
indicating 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:
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
-
toString
-