| java.lang.Object java.io.OutputStream sun.rmi.transport.tcp.MultiplexOutputStream
MultiplexOutputStream | final class MultiplexOutputStream extends OutputStream (Code) | | MultiplexOutputStream manages sending data over a conection managed
by a ConnectionMultiplexer object. Data written is buffered until the
internal buffer is full or the flush() method is called, at which
point it attempts to push a packet of bytes through to the remote
endpoint. This will never push more bytes than the amount already
requested by the remote endpoint (to prevent receive buffer from
overflowing), so if the write() and flush() methods will block
until their operation can complete if enough bytes cannot be
pushed immediately.
author: Peter Jones |
Method Summary | |
public void | close() Close this connection. | void | disconnect() Disconnect this stream from all connection activity. | public synchronized void | flush() Guarantee that all data written to this stream has been pushed
over and made available to the remote endpoint. | void | request(int num) Take note of more bytes requested by conection at remote endpoint. | public synchronized void | write(int b) Write a byte over connection. | public synchronized void | write(byte b, int off, int len) Write a subarray of bytes over connection. |
MultiplexOutputStream | MultiplexOutputStream(ConnectionMultiplexer manager, MultiplexConnectionInfo info, int bufferLength)(Code) | | Create a new MultiplexOutputStream for the given manager.
Parameters: manager - object that manages this connection Parameters: info - structure for connection this stream writes to Parameters: bufferLength - length of output buffer |
disconnect | void disconnect()(Code) | | Disconnect this stream from all connection activity.
|
flush | public synchronized void flush() throws IOException(Code) | | Guarantee that all data written to this stream has been pushed
over and made available to the remote endpoint.
|
request | void request(int num)(Code) | | Take note of more bytes requested by conection at remote endpoint.
Parameters: num - number of additional bytes requested |
write | public synchronized void write(int b) throws IOException(Code) | | Write a byte over connection.
Parameters: b - byte of data to write |
write | public synchronized void write(byte b, int off, int len) throws IOException(Code) | | Write a subarray of bytes over connection.
Parameters: b - array containing bytes to write Parameters: off - offset of beginning of bytes to write Parameters: len - number of bytes to write |
|
|