net.schmizz.sshj.connection.channel
Class ChannelOutputStream
java.lang.Object
java.io.OutputStream
net.schmizz.sshj.connection.channel.ChannelOutputStream
- All Implemented Interfaces:
- Closeable, Flushable, ErrorNotifiable
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()
.
ChannelOutputStream
public ChannelOutputStream(Channel chan,
Transport trans,
Window.Remote win)
write
public void write(int w)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] data,
int off,
int len)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
notifyError
public void notifyError(SSHException error)
- Description copied from interface:
ErrorNotifiable
- Notifies this object of an
error
.
- Specified by:
notifyError
in interface ErrorNotifiable
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class OutputStream
- Throws:
IOException
setClosed
public void setClosed()
flush
public void flush()
throws IOException
- Send all data currently buffered. If window space is exhausted in the process, this will block
until it is expanded by the server.
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class OutputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2012. All Rights Reserved.