public final class ChannelOutputStream extends OutputStream implements ErrorNotifiable
OutputStream
for channels. Buffers data upto the remote window's maximum packet size. Data can also be
flushed via flush()
and is also flushed on close()
.ErrorNotifiable.Util
Constructor and Description |
---|
ChannelOutputStream(Channel chan,
Transport trans,
Window.Remote win) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush()
Send all data currently buffered.
|
void |
notifyError(SSHException error)
Notifies this object of an
error . |
void |
setClosed() |
String |
toString() |
void |
write(byte[] data,
int off,
int len) |
void |
write(int w) |
write
public ChannelOutputStream(Channel chan, Transport trans, Window.Remote win)
public void write(int w) throws IOException
write
in class OutputStream
IOException
public void write(byte[] data, int off, int len) throws IOException
write
in class OutputStream
IOException
public void notifyError(SSHException error)
ErrorNotifiable
error
.notifyError
in interface ErrorNotifiable
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
public void setClosed()
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
Copyright © 2009-2014. All Rights Reserved.