Class ChannelInputStream
java.lang.Object
java.io.InputStream
net.schmizz.sshj.connection.channel.ChannelInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,ErrorNotifiable
InputStream for channels. Can receive data into its buffer for serving to
readers.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.schmizz.sshj.common.ErrorNotifiable
ErrorNotifiable.Util -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final CircularBuffer.PlainCircularBufferprivate final Channelprivate booleanprivate SSHExceptionprivate final org.slf4j.Loggerprivate final Transportprivate final Window.Local -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprivate voidvoidclose()voideof()voidnotifyError(SSHException error) Notifies this object of anerror.intread()intread(byte[] b, int off, int len) voidreceive(byte[] data, int offset, int len) toString()Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
log
private final org.slf4j.Logger log -
chan
-
trans
-
win
-
buf
-
b
private final byte[] b -
eof
private boolean eof -
error
-
-
Constructor Details
-
ChannelInputStream
-
-
Method Details
-
available
public int available()- Overrides:
availablein classInputStream
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
eof
public void eof() -
notifyError
Description copied from interface:ErrorNotifiableNotifies this object of anerror.- Specified by:
notifyErrorin interfaceErrorNotifiable
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
receive
- Throws:
SSHException
-
checkWindow
- Throws:
TransportException
-
toString
-