Class prominence.msg.MultiplexInputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class prominence.msg.MultiplexInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----java.io.FilterInputStream
                   |
                   +----java.io.DataInputStream
                           |
                           +----prominence.msg.MessageInput
                                   |
                                   +----prominence.msg.MultiplexInputStream

public class MultiplexInputStream
extends MessageInput
A MessageInput that attaches to an existing MessageInput and strips the multiplexing label from each message that is received.

The label is made publicly accessible in the label variable.

See Also:
MultiplexOutputStream

Variable Index

 o i
The MessageInput to which this is attached.
 o label
The multiplexing label of the most recently received message.

Constructor Index

 o MultiplexInputStream(MessageInput)
Creates a new MultiplexInputStream.

Method Index

 o receive()
Receives a new message from i and strips the multiplexing label.

Variables

 o label
  public String label
The multiplexing label of the most recently received message.
 o i
  protected MessageInput i
The MessageInput to which this is attached.

Constructors

 o MultiplexInputStream
  public MultiplexInputStream(MessageInput i)
Creates a new MultiplexInputStream.
Parameters:
i - The MessageInput from which messages should be received

Methods

 o receive
  public void receive() throws IOException
Receives a new message from i and strips the multiplexing label. The label is accessible in the label variable; the contents of the message can be read through the usual superclass read() methods.
Throws: IOException
Occurs if there is a problem receiving a message or extracting the multiplexing label.
Overrides:
receive in class MessageInput

All Packages  Class Hierarchy  This Package  Previous  Next  Index