Class ChannelOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- net.schmizz.sshj.connection.channel.ChannelOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
,ErrorNotifiable
public final class ChannelOutputStream extends java.io.OutputStream implements ErrorNotifiable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable
ErrorNotifiable.Util
-
-
Constructor Summary
Constructors Constructor Description ChannelOutputStream(AbstractChannel chan, Transport trans, Window.Remote win)
-
Method Summary
Modifier and Type Method Description void
close()
void
flush()
Send all data currently buffered.void
notifyError(SSHException error)
Notifies this object of anerror
.java.lang.String
toString()
void
write(byte[] data, int off, int len)
void
write(int w)
-
-
-
Constructor Detail
-
ChannelOutputStream
public ChannelOutputStream(AbstractChannel chan, Transport trans, Window.Remote win)
-
-
Method Detail
-
write
public void write(int w) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] data, int off, int len) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
notifyError
public void notifyError(SSHException error)
Description copied from interface:ErrorNotifiable
Notifies this object of anerror
.- Specified by:
notifyError
in interfaceErrorNotifiable
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.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 interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-