peer2me.message
Class ObjectInputStream

java.lang.Object
  extended by peer2me.message.ObjectInputStream

public class ObjectInputStream
extends java.lang.Object

When a node receives a stream of bytes, this class deserializes the stream and creates an object of it. This class calls the implemented deserialize() method from the Serializable interface. The object that is created must be casted to the correct class. This task must be solved by the application developer.

Author:
Kim Saxlund
See Also:
Serializable

Constructor Summary
ObjectInputStream(java.io.DataInputStream in)
          Constructor that starts deserializing the stream at once
 
Method Summary
 java.lang.Object getObject()
          Returns the object that was deserialized
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectInputStream

public ObjectInputStream(java.io.DataInputStream in)
Constructor that starts deserializing the stream at once

Parameters:
in - The DataInputStream that needs to be deserialized
Method Detail

getObject

public java.lang.Object getObject()
Returns the object that was deserialized

Returns:
The deserialized object. Should be casted to the correct class when returned.