org.objectweb.jonas_ejb.lib
Class MarshallTool

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.lib.MarshallTool

public class MarshallTool
extends java.lang.Object


Constructor Summary
MarshallTool()
           
 
Method Summary
static java.io.Serializable fromBytes(byte[] bytes)
          Converts byte array to an instance of java.io.Serializable
static byte[] toBytes(java.io.Serializable o)
          Converts an instance of java.io.Serializable to a serialized byte array
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshallTool

public MarshallTool()
Method Detail

toBytes

public static byte[] toBytes(java.io.Serializable o)
                      throws java.io.IOException
Converts an instance of java.io.Serializable to a serialized byte array
Parameters:
o - Object to serialize
Returns:
byte array containing the serialization of the Serializable object

fromBytes

public static java.io.Serializable fromBytes(byte[] bytes)
                                      throws java.io.IOException,
                                             java.lang.ClassNotFoundException
Converts byte array to an instance of java.io.Serializable
Parameters:
bytes - A byte array containing the a serialized object
Returns:
the unmarshalled object