public final class

ChannelInputStream

extends InputStream
implements ErrorNotifiable
java.lang.Object
   ↳ java.io.InputStream
     ↳ net.schmizz.sshj.connection.channel.ChannelInputStream

Class Overview

InputStream for channels. Can receive data into its buffer for serving to readers.

Summary

[Expand]
Inherited Constants
From class java.io.InputStream
Fields
private final byte[] b
private final Buffer.PlainBuffer buf
private final Channel chan
private boolean eof
private SSHException error
private final Logger log
private final Transport trans
private final Window.Local win
Public Constructors
ChannelInputStream(Channel chan, Transport trans, Window.Local win)
Public Methods
int available()
void close()
void eof()
synchronized void notifyError(SSHException error)
Notifies this object of an error.
int read()
int read(byte[] b, int off, int len)
void receive(byte[] data, int offset, int len)
String toString()
[Expand]
Inherited Methods
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable
From interface net.schmizz.sshj.common.ErrorNotifiable

Fields

private final byte[] b

private final Buffer.PlainBuffer buf

private final Channel chan

private boolean eof

private SSHException error

private final Logger log

private final Transport trans

private final Window.Local win

Public Constructors

public ChannelInputStream (Channel chan, Transport trans, Window.Local win)

Parameters
chan
trans
win

Public Methods

public int available ()

public void close ()

public void eof ()

public synchronized void notifyError (SSHException error)

Notifies this object of an error.

Parameters
error

public int read ()

Throws
IOException

public int read (byte[] b, int off, int len)

Parameters
b
off
len
Throws
IOException

public void receive (byte[] data, int offset, int len)

Parameters
data
offset
len

public String toString ()