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
public class ChannelOutputStream extends OutputStream implements Channel, ChannelHolder
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_WAIT_FOR_SPACE_TIMEOUT
static String
WAIT_FOR_SPACE_TIMEOUT
Configure max.
-
Constructor Summary
Constructors Constructor Description ChannelOutputStream(AbstractChannel channel, Window remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
ChannelOutputStream(AbstractChannel channel, Window remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
AbstractChannel
getChannel()
boolean
isEofOnClose()
boolean
isNoDelay()
boolean
isOpen()
protected void
newBuffer(int size)
void
setNoDelay(boolean noDelay)
String
toString()
void
write(byte[] buf, int s, int l)
void
write(int w)
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Field Detail
-
WAIT_FOR_SPACE_TIMEOUT
public static final String WAIT_FOR_SPACE_TIMEOUT
Configure max. wait time (millis) to wait for space to become available- See Also:
- Constant Field Values
-
DEFAULT_WAIT_FOR_SPACE_TIMEOUT
public static final long DEFAULT_WAIT_FOR_SPACE_TIMEOUT
-
-
Constructor Detail
-
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)
-
-
Method Detail
-
getChannel
public AbstractChannel 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()
-
write
public void write(int w) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] buf, int s, int l) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- 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)
-
-