| java.lang.Object java.io.InputStream sun.rmi.transport.tcp.MultiplexInputStream
MultiplexInputStream | final class MultiplexInputStream extends InputStream (Code) | | MultiplexInputStream manages receiving data over a connection managed
by a ConnectionMultiplexer object. This object is responsible for
requesting more bytes of data as space in its internal buffer becomes
available.
author: Peter Jones |
Method Summary | |
public int | available() Return the number of bytes immediately available for reading. | public void | close() Close this connection. | void | disconnect() Disconnect this stream from all connection activity. | public synchronized int | read() Read a byte from the connection. | public synchronized int | read(byte b, int off, int len) Read a subarray of bytes from connection. | void | receive(int length, DataInputStream in) Receive bytes transmitted from connection at remote endpoint. |
MultiplexInputStream | MultiplexInputStream(ConnectionMultiplexer manager, MultiplexConnectionInfo info, int bufferLength)(Code) | | Create a new MultiplexInputStream for the given manager.
Parameters: manager - object that manages this connection Parameters: info - structure for connection this stream reads from Parameters: bufferLength - length of input buffer |
available | public int available() throws IOException(Code) | | Return the number of bytes immediately available for reading.
|
disconnect | void disconnect()(Code) | | Disconnect this stream from all connection activity.
|
read | public synchronized int read() throws IOException(Code) | | Read a byte from the connection.
|
read | public synchronized int read(byte b, int off, int len) throws IOException(Code) | | Read a subarray of bytes from connection. This method blocks for
at least one byte, and it returns the number of bytes actually read,
or -1 if the end of the stream was detected.
Parameters: b - array to read bytes into Parameters: off - offset of beginning of bytes to read into Parameters: len - number of bytes to read |
receive | void receive(int length, DataInputStream in) throws IOException(Code) | | Receive bytes transmitted from connection at remote endpoint.
Parameters: length - number of bytes transmitted Parameters: in - input stream with those bytes ready to be read |
|
|