|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.util.marshalling.Serialization
public final class Serialization
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.
Constructor Summary | |
---|---|
private |
Serialization()
Utility class, no public constructor. |
Method Summary | |
---|---|
static java.lang.Object |
loadObject(byte[] bytes)
Transforms the given array of bytes into an object. |
static byte[] |
storeObject(java.io.Serializable object)
Gets an array of bytes corresponding to the given object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private Serialization()
Method Detail |
---|
public static byte[] storeObject(java.io.Serializable object) throws java.io.IOException
object
- the object to serialize
java.io.IOException
- if the object can't be turned into an array of bytes.public static java.lang.Object loadObject(byte[] bytes) throws java.io.IOException, java.lang.ClassNotFoundException
bytes
- given array of bytes representing the object
java.io.IOException
- if marshalling fails
java.lang.ClassNotFoundException
- if the class required for loading the object is not found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |