public class ChannelOutputStream extends OutputStream implements Channel, ChannelHolder
Modifier and Type | Class and Description |
---|---|
protected static class |
ChannelOutputStream.OpenState |
protected static class |
ChannelOutputStream.WriteState |
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
protected AtomicReference<ChannelOutputStream.OpenState> |
openState |
Constructor and Description |
---|
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) |
ChannelOutputStream(AbstractChannel channel,
RemoteWindow remoteWindow,
long maxWaitTimeout,
org.slf4j.Logger log,
byte cmd,
boolean eofOnClose) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
AbstractChannel |
getChannel() |
byte |
getCommandType() |
boolean |
isEofOnClose() |
boolean |
isNoDelay() |
boolean |
isOpen() |
protected Buffer |
newBuffer(int size) |
void |
setNoDelay(boolean noDelay) |
String |
toString() |
void |
write(byte[] buf,
int s,
int l) |
void |
write(int w) |
write
protected final AtomicReference<ChannelOutputStream.OpenState> openState
protected final org.slf4j.Logger log
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, long maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
public ChannelOutputStream(AbstractChannel channel, RemoteWindow remoteWindow, Duration maxWaitTimeout, org.slf4j.Logger log, byte cmd, boolean eofOnClose)
public AbstractChannel getChannel()
getChannel
in interface ChannelHolder
Channel
instancepublic byte getCommandType()
SSH_MSG_CHANNEL_DATA
or
SSH_MSG_CHANNEL_EXTENDED_DATA
indicating the output
stream typepublic boolean isEofOnClose()
public boolean isNoDelay()
public void setNoDelay(boolean noDelay)
public void write(int w) throws IOException
write
in class OutputStream
IOException
public void write(byte[] buf, int s, int l) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
close
in class OutputStream
IOException
protected Buffer newBuffer(int size)
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.