cgl.narada.util
Class ObjectMarshaller

java.lang.Object
  extended by cgl.narada.util.ObjectMarshaller

public class ObjectMarshaller
extends Object

A utility class to Marshall and Unmarshall object and object bytes


Constructor Summary
ObjectMarshaller()
           
 
Method Summary
static byte[] marshall(Object object)
          Marshall an object into a byte stream
static Object readObject(DataInputStream din)
          Reads an object that was written using the writeObject(object, DataOutputStream) from a DataInputStream
static Object unmarshall(byte[] objectBytes)
          Unmrahsall an object from a byte stream
static void writeObject(Object object, DataOutputStream dout)
          Writes an object onto a DataOutputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectMarshaller

public ObjectMarshaller()
Method Detail

marshall

public static byte[] marshall(Object object)
                       throws IOException
Marshall an object into a byte stream

Throws:
IOException

unmarshall

public static Object unmarshall(byte[] objectBytes)
                         throws IOException,
                                ClassNotFoundException
Unmrahsall an object from a byte stream

Throws:
IOException
ClassNotFoundException

writeObject

public static void writeObject(Object object,
                               DataOutputStream dout)
                        throws IOException
Writes an object onto a DataOutputStream

Throws:
IOException

readObject

public static Object readObject(DataInputStream din)
                         throws IOException,
                                ClassNotFoundException
Reads an object that was written using the writeObject(object, DataOutputStream) from a DataInputStream

Throws:
IOException
ClassNotFoundException


For comments and suggestions please send e-mail to The NaradaBrokering Project