| |
|
| java.lang.Object org.ow2.easybeans.util.marshalling.Serialization
Serialization | final public class Serialization (Code) | | Allow to get the bytes of an object or to recreate an object from bytes.
It also used a custom reader when recreating object as it uses the context
classloader in order to have an object with the right classloader.
author: Florent Benoit |
Method Summary | |
public static Object | loadObject(byte[] bytes) Transforms the given array of bytes into an object. | public static byte[] | storeObject(Serializable object) Gets an array of bytes corresponding to the given object. |
loadObject | public static Object loadObject(byte[] bytes) throws IOException, ClassNotFoundException(Code) | | Transforms the given array of bytes into an object.
Parameters: bytes - given array of bytes representing the object object which has been unmarshalled. throws: IOException - if marshalling fails throws: ClassNotFoundException - if the class required for loading the object is not found. |
storeObject | public static byte[] storeObject(Serializable object) throws IOException(Code) | | Gets an array of bytes corresponding to the given object.
Parameters: object - the object to serialize an array of bytes. throws: IOException - if the object can't be turned into an array of bytes. |
|
|
|