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
-
i
- The MessageInput to which this is attached.
-
label
- The multiplexing label of the most recently received message.
-
MultiplexInputStream(MessageInput)
- Creates a new MultiplexInputStream.
-
receive()
- Receives a new message from i and strips the multiplexing
label.
label
public String label
- The multiplexing label of the most recently received message.
i
protected MessageInput i
- The MessageInput to which this is attached.
MultiplexInputStream
public MultiplexInputStream(MessageInput i)
- Creates a new MultiplexInputStream.
- Parameters:
- i - The MessageInput from which messages should
be received
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