net.schmizz.sshj.connection.channel
Class ChannelInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by net.schmizz.sshj.connection.channel.ChannelInputStream
All Implemented Interfaces:
Closeable, ErrorNotifiable

public final class ChannelInputStream
extends InputStream
implements 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
 
Constructor Summary
ChannelInputStream(Channel chan, Transport trans, Window.Local win)
           
 
Method Summary
 int available()
           
 void close()
           
 void eof()
           
 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()
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChannelInputStream

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

available

public int available()
Overrides:
available in class InputStream

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class InputStream

eof

public void eof()

notifyError

public void notifyError(SSHException error)
Description copied from interface: ErrorNotifiable
Notifies this object of an error.

Specified by:
notifyError in interface ErrorNotifiable

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

receive

public void receive(byte[] data,
                    int offset,
                    int len)
             throws ConnectionException,
                    TransportException
Throws:
ConnectionException
TransportException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2012. All Rights Reserved.