Class prominence.msg.MessageInputStream
All Packages Class Hierarchy This Package Previous Next Index
Class prominence.msg.MessageInputStream
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.FilterInputStream
|
+----java.io.DataInputStream
|
+----prominence.msg.MessageInput
|
+----prominence.msg.MessageInputStream
- public class MessageInputStream
- extends MessageInput
A MessageInput that reads messages from an
attached InputStream.
- See Also:
- MessageOutputStream
-
dataI
- A DataInputStream attached to i.
-
i
- The attached InputStream.
-
MessageInputStream(InputStream)
- Creates a new MessageInputStream.
-
receive()
- Receives a message from the attached stream.
i
protected InputStream i
- The attached InputStream.
dataI
protected DataInputStream dataI
- A DataInputStream attached to i.
MessageInputStream
public MessageInputStream(InputStream i)
- Creates a new MessageInputStream.
- Parameters:
- i - The InputStream from which to read messages.
receive
public void receive() throws IOException
- Receives a message from the attached stream. An int
header is read, which indicates the length of the message body.
The message body is then read and made available through the
usual superclass read() methods.
This method synchronizes on the attached stream.
- Throws: IOException
- Occurs if there is a problem reading
from the attached stream.
- Overrides:
- receive in class MessageInput
All Packages Class Hierarchy This Package Previous Next Index