Package org.apache.openjpa.util
Class Serialization
- java.lang.Object
-
- org.apache.openjpa.util.Serialization
-
public class Serialization extends java.lang.ObjectHelper class to serialize and deserialize persistent objects, subtituting oids into the serialized stream and subtituting the persistent objects back during deserialization.- Since:
- 0.3.3
- Author:
- Abe White
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSerialization.ClassResolvingObjectInputStreamstatic classSerialization.PersistentObjectInputStreamObject input stream that replaces oids with their objects.static classSerialization.PersistentObjectOutputStreamObject output stream that replaces persistent objects with their oids.
-
Constructor Summary
Constructors Constructor Description Serialization()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Objectdeserialize(byte[] bytes, StoreContext ctx)Deserialize an object value from the given bytes.static java.lang.Objectdeserialize(java.io.InputStream in, StoreContext ctx)Deserialize an object value from the given stream.static byte[]serialize(java.lang.Object val, StoreContext ctx)Serialize a value that might contain persistent objects.
-
-
-
Method Detail
-
serialize
public static byte[] serialize(java.lang.Object val, StoreContext ctx)Serialize a value that might contain persistent objects. Replaces persistent objects with their oids.
-
deserialize
public static java.lang.Object deserialize(byte[] bytes, StoreContext ctx)Deserialize an object value from the given bytes.
-
deserialize
public static java.lang.Object deserialize(java.io.InputStream in, StoreContext ctx)Deserialize an object value from the given stream.
-
-