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

Variable Index

 o dataI
A DataInputStream attached to i.
 o i
The attached InputStream.

Constructor Index

 o MessageInputStream(InputStream)
Creates a new MessageInputStream.

Method Index

 o receive()
Receives a message from the attached stream.

Variables

 o i
  protected InputStream i
The attached InputStream.
 o dataI
  protected DataInputStream dataI
A DataInputStream attached to i.

Constructors

 o MessageInputStream
  public MessageInputStream(InputStream i)
Creates a new MessageInputStream.
Parameters:
i - The InputStream from which to read messages.

Methods

 o 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