org.objectweb.jonas_ejb.lib.MarshallTool Class Reference

List of all members.

Static Public Member Functions

synchronized byte[] toBytes (Serializable o) throws IOException
synchronized Serializable fromBytes (byte[] bytes) throws IOException, ClassNotFoundException

Detailed Description

Contains static methods to marshall/unmarshall objects to/from a byte[]

Author:
Vincent Trussart (vincent@linuxfreak.com) : Initial developer

Helene Joanin

Definition at line 45 of file MarshallTool.java.


Member Function Documentation

synchronized Serializable org.objectweb.jonas_ejb.lib.MarshallTool.fromBytes byte[]  bytes  )  throws IOException, ClassNotFoundException [static]
 

Converts byte array to an instance of java.io.Serializable

Parameters:
bytes A byte array containing the a serialized object
Returns:
the unmarshalled object
Exceptions:
IOException in error case
ClassNotFoundException in error case

Specialization of the java.io.ObjectInputStream to re-implement the resolveClass method

Default constructor

Parameters:
is input stream to read from
Exceptions:
IOException in error case

Load the local class equivalent of the specified stream class description using the context class loader.

Parameters:
osc an instance of class ObjectStreamClass
Returns:
a Class object corresponding to the osc
Exceptions:
IOException in error case
ClassNotFoundException in error case

Definition at line 72 of file MarshallTool.java.

synchronized byte [] org.objectweb.jonas_ejb.lib.MarshallTool.toBytes Serializable  o  )  throws IOException [static]
 

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
Exceptions:
IOException in error case

Definition at line 53 of file MarshallTool.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:12:04 2005 for JOnAS by  doxygen 1.3.9.1