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.PlainCircularBuffer
private final Channel
private boolean
private SSHException
private final org.slf4j.Logger
private final Transport
private final Window.Local
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
private void
void
close()
void
eof()
void
notifyError
(SSHException error) Notifies this object of anerror
.int
read()
int
read
(byte[] b, int off, int len) void
receive
(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:
available
in classInputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
eof
public void eof() -
notifyError
Description copied from interface:ErrorNotifiable
Notifies this object of anerror
.- Specified by:
notifyError
in interfaceErrorNotifiable
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
receive
- Throws:
SSHException
-
checkWindow
- Throws:
TransportException
-
toString
-