Class w3c.www.mux.MuxOutputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.mux.MuxOutputStream

java.lang.Object
   |
   +----java.io.OutputStream
           |
           +----w3c.www.mux.MuxOutputStream

public class MuxOutputStream
extends OutputStream

Variable Index

 o avail_credit
The currently available credit.
 o closed
Has this stream been closed ?
 o debug
 o fragsz
The current max allowed fragment size.
 o sessid
The identifier of above session (fast access).
 o session
The session this stream is attached to.
 o writer
The writer instance for the multiplexed stream.

Constructor Index

 o MuxOutputStream(MuxSession)

Method Index

 o close()
Close that session output stream.
 o flush()
Flush that output stream, blocking all data has been sent.
 o notifyControl(int)
Callback notifying the the frgament size has changed.
 o notifyCredit(int)
Callback notifying that more credit is available for that stream.
 o write(byte[], int, int)
Writes a sub array of bytes.
 o write(int)
Writes a byte.

Variables

 o debug
  protected final static boolean debug
 o session
  protected MuxSession session
The session this stream is attached to.
 o sessid
  protected int sessid
The identifier of above session (fast access).
 o writer
  protected MuxWriter writer
The writer instance for the multiplexed stream.
 o fragsz
  protected int fragsz
The current max allowed fragment size.
 o avail_credit
  protected int avail_credit
The currently available credit.
 o closed
  protected boolean closed
Has this stream been closed ?

Constructors

 o MuxOutputStream
  protected MuxOutputStream(MuxSession session)

Methods

 o notifyCredit
  protected synchronized void notifyCredit(int credit)
Callback notifying that more credit is available for that stream.
Parameters:
credit - The credit we are getting from our peer.
 o notifyControl
  protected synchronized void notifyControl(int control)
Callback notifying the the frgament size has changed.
Parameters:
control - The new fragment size.
 o write
  public void write(int b) throws IOException
Writes a byte. This method will block until the byte is actually written. It is highly recomended that you use a buffered output stream on top of that stream, or that you don't use that method.
Parameters:
b - the byte
Throws: IOException
If an I/O error has occurred.
Overrides:
write in class OutputStream
 o write
  public void write(byte b[],
                    int off,
                    int len) throws IOException
Writes a sub array of bytes.
Parameters:
b - the data to be written
off - the start offset in the data
len - the number of bytes that are written
Throws: IOException
If an I/O error has occurred.
Overrides:
write in class OutputStream
 o flush
  public void flush() throws IOException
Flush that output stream, blocking all data has been sent.
Throws: IOException
If some IO errors occur.
Overrides:
flush in class OutputStream
 o close
  public synchronized void close() throws IOException
Close that session output stream.
Throws: IOException
If some IO errors occur.
Overrides:
close in class OutputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index