All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cmu.owl.ui.threeD.transport.ThreeDEvent

edu.cmu.owl.ui.threeD.transport.ThreeDEvent

public abstract class ThreeDEvent
This interface is essentially a tag for events that will be Serialized. Essentially, this class has the same purpose of jdk1.1 Serializable interface. The implementation for serialization in our case will be very similar to MFC's implementation for simplicity.

Version:
1.0

Constructor Index

 o ThreeDEvent()

Method Index

 o readObject(DataInputStream)
This method takes a stream and unserializes an object from it an returns it.
 o serialize(DataOutputStream)
This method should serialize the current object into the Output Stream.
 o serializeString(String, DataOutputStream)
This method is a static method used to serialize any string.
 o unSerialize(DataInputStream)
This method will take the Input Stream and fill it's attributes based on it.
 o unSerializeString(DataInputStream)
This method is a static method used to unserlialize any string.
 o writeObject(ThreeDEvent, DataOutputStream)
This method fully serializes an object from a stream

Constructors

 o ThreeDEvent
 public ThreeDEvent()

Methods

 o serializeString
 protected static final void serializeString(String string,
                                             DataOutputStream outputStream) throws IOException
This method is a static method used to serialize any string. First the method writes the length of the string in the stream and then the string itself

Parameters:
string - the string to be serialized
outputStream - the output stream where to serialize
Throws: IOException
if any thing fails with the stream
 o unSerializeString
 protected static final String unSerializeString(DataInputStream inputStream) throws IOException
This method is a static method used to unserlialize any string. First the method reads the length of the string and then the string itself

Parameters:
inputStream - the stream from which to unserialize
Returns:
the unserialized string
Throws: IOException
if any thing fails with the stream
 o serialize
 protected abstract void serialize(DataOutputStream outputStream) throws IOException
This method should serialize the current object into the Output Stream. It should also recursively serialize all associated objects

Parameters:
outputStream - the stream on which to serialize
Throws: IOException
if any thing fails with the stream
 o unSerialize
 protected abstract void unSerialize(DataInputStream inputStream) throws IOException
This method will take the Input Stream and fill it's attributes based on it. This method should be called by the overloaded constructor. This method should recursively unserialize associated objects IMPORTANT NOTE: This method should unserialize in the same order as the serialize method.

Parameters:
inputStream - the stream from which to unserialize
Throws: IOException
if any thing fails with the stream
 o writeObject
 public static void writeObject(ThreeDEvent object,
                                DataOutputStream outputStream) throws IOException
This method fully serializes an object from a stream

Parameters:
outputStream - the stream on which to serialize
the - object to serialize
Throws: IOException
if any thing fails with the stream
 o readObject
 public static ThreeDEvent readObject(DataInputStream inputStream) throws IOException, IllegalAccessException, InstantiationException, ClassNotFoundException
This method takes a stream and unserializes an object from it an returns it.

Parameters:
inputStream - the stream from which to unserialize
Returns:
the unserialized ThreeDEvent object
Throws: IOException
if any thing fails with the stream
Throws: IllegalAccessException
if such an exception occurs during the unserialization
Throws: InstantiationException
if such an exception occurs during the unserialization
Throws: ClassNotFoundException
if such an exception occurs during the unserialization

All Packages  Class Hierarchy  This Package  Previous  Next  Index