Class Serializer
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.util.Serializer
-
public final class Serializer extends Object
Serializer
is a utility class that provides static methods for serializing & deserializingItemState
andNodeReferences
objects 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 void
deserialize(NodeReferences refs, InputStream stream)
Deserializes aNodeReferences
object from the given binarystream
.static void
deserialize(NodeState state, InputStream stream)
Deserializes aNodeState
object from the given binarystream
.static void
deserialize(PropertyState state, InputStream stream, BLOBStore blobStore)
Deserializes aPropertyState
object from the given binarystream
.static void
serialize(NodeReferences refs, OutputStream stream)
Serializes the specifiedNodeReferences
object to the given binarystream
.static void
serialize(NodeState state, OutputStream stream)
Serializes the specifiedNodeState
object to the given binarystream
.static void
serialize(PropertyState state, OutputStream stream, BLOBStore blobStore)
Serializes the specifiedPropertyState
object to the given binarystream
.
-
-
-
Method Detail
-
serialize
public static void serialize(NodeState state, OutputStream stream) throws Exception
Serializes the specifiedNodeState
object to the given binarystream
.- Parameters:
state
-state
to serializestream
- the stream where thestate
should 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 aNodeState
object from the given binarystream
.- Parameters:
state
-state
to deserializestream
- the stream where thestate
should 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 specifiedPropertyState
object to the given binarystream
. Binary values are stored in the specifiedBLOBStore
.- Parameters:
state
-state
to serializestream
- the stream where thestate
should 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 aPropertyState
object from the given binarystream
. Binary values are retrieved from the specifiedBLOBStore
.- Parameters:
state
-state
to deserializestream
- the stream where thestate
should 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 specifiedNodeReferences
object 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 aNodeReferences
object 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)
-
-