Class Serializer
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.util.Serializer
-
public final class Serializer extends Object
Serializeris a utility class that provides static methods for serializing & deserializingItemStateandNodeReferencesobjects using a simple binary serialization format.
-
-
Constructor Summary
Constructors Constructor Description Serializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeserialize(NodeReferences refs, InputStream stream)Deserializes aNodeReferencesobject from the given binarystream.static voiddeserialize(NodeState state, InputStream stream)Deserializes aNodeStateobject from the given binarystream.static voiddeserialize(PropertyState state, InputStream stream, BLOBStore blobStore)Deserializes aPropertyStateobject from the given binarystream.static voidserialize(NodeReferences refs, OutputStream stream)Serializes the specifiedNodeReferencesobject to the given binarystream.static voidserialize(NodeState state, OutputStream stream)Serializes the specifiedNodeStateobject to the given binarystream.static voidserialize(PropertyState state, OutputStream stream, BLOBStore blobStore)Serializes the specifiedPropertyStateobject to the given binarystream.
-
-
-
Method Detail
-
serialize
public static void serialize(NodeState state, OutputStream stream) throws Exception
Serializes the specifiedNodeStateobject to the given binarystream.- Parameters:
state-stateto serializestream- the stream where thestateshould be serialized to- Throws:
Exception- if an error occurs during the serialization- See Also:
deserialize(NodeState, InputStream)
-
deserialize
public static void deserialize(NodeState state, InputStream stream) throws Exception
Deserializes aNodeStateobject from the given binarystream.- Parameters:
state-stateto deserializestream- the stream where thestateshould be deserialized from- Throws:
Exception- if an error occurs during the deserialization- See Also:
serialize(NodeState, OutputStream)
-
serialize
public static void serialize(PropertyState state, OutputStream stream, BLOBStore blobStore) throws Exception
Serializes the specifiedPropertyStateobject to the given binarystream. Binary values are stored in the specifiedBLOBStore.- Parameters:
state-stateto serializestream- the stream where thestateshould be serialized toblobStore- handler for BLOB data- Throws:
Exception- if an error occurs during the serialization- See Also:
deserialize(PropertyState, InputStream,BLOBStore)
-
deserialize
public static void deserialize(PropertyState state, InputStream stream, BLOBStore blobStore) throws Exception
Deserializes aPropertyStateobject from the given binarystream. Binary values are retrieved from the specifiedBLOBStore.- Parameters:
state-stateto deserializestream- the stream where thestateshould be deserialized fromblobStore- handler for BLOB data- Throws:
Exception- if an error occurs during the deserialization- See Also:
serialize(PropertyState, OutputStream, BLOBStore)
-
serialize
public static void serialize(NodeReferences refs, OutputStream stream) throws Exception
Serializes the specifiedNodeReferencesobject to the given binarystream.- Parameters:
refs- object to serializestream- the stream where the object should be serialized to- Throws:
Exception- if an error occurs during the serialization- See Also:
deserialize(NodeReferences, InputStream)
-
deserialize
public static void deserialize(NodeReferences refs, InputStream stream) throws Exception
Deserializes aNodeReferencesobject from the given binarystream.- Parameters:
refs- object to deserializestream- the stream where the object should be deserialized from- Throws:
Exception- if an error occurs during the deserialization- See Also:
serialize(NodeReferences, OutputStream)
-
-