public final class Serializer extends Object
Serializer
is a utility class that provides static methods
for serializing & deserializing ItemState
and
NodeReferences
objects using a simple binary serialization
format.Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
static void |
deserialize(NodeReferences refs,
InputStream stream)
Deserializes a
NodeReferences object from the given
binary stream . |
static void |
deserialize(NodeState state,
InputStream stream)
Deserializes a
NodeState object from the given binary
stream . |
static void |
deserialize(PropertyState state,
InputStream stream,
BLOBStore blobStore)
Deserializes a
PropertyState object from the given binary
stream . |
static void |
serialize(NodeReferences refs,
OutputStream stream)
Serializes the specified
NodeReferences object to the given
binary stream . |
static void |
serialize(NodeState state,
OutputStream stream)
Serializes the specified
NodeState object to the given
binary stream . |
static void |
serialize(PropertyState state,
OutputStream stream,
BLOBStore blobStore)
Serializes the specified
PropertyState object to the given
binary stream . |
public static void serialize(NodeState state, OutputStream stream) throws Exception
NodeState
object to the given
binary stream
.state
- state
to serializestream
- the stream where the state
should be
serialized toException
- if an error occurs during the serializationdeserialize(NodeState, InputStream)
public static void deserialize(NodeState state, InputStream stream) throws Exception
NodeState
object from the given binary
stream
.state
- state
to deserializestream
- the stream where the state
should be deserialized fromException
- if an error occurs during the deserializationserialize(NodeState, OutputStream)
public static void serialize(PropertyState state, OutputStream stream, BLOBStore blobStore) throws Exception
PropertyState
object to the given
binary stream
. Binary values are stored in the specified
BLOBStore
.state
- state
to serializestream
- the stream where the state
should be
serialized toblobStore
- handler for BLOB dataException
- if an error occurs during the serializationdeserialize(PropertyState, InputStream,BLOBStore)
public static void deserialize(PropertyState state, InputStream stream, BLOBStore blobStore) throws Exception
PropertyState
object from the given binary
stream
. Binary values are retrieved from the specified
BLOBStore
.state
- state
to deserializestream
- the stream where the state
should be
deserialized fromblobStore
- handler for BLOB dataException
- if an error occurs during the deserializationserialize(PropertyState, OutputStream, BLOBStore)
public static void serialize(NodeReferences refs, OutputStream stream) throws Exception
NodeReferences
object to the given
binary stream
.refs
- object to serializestream
- the stream where the object should be serialized toException
- if an error occurs during the serializationdeserialize(NodeReferences, InputStream)
public static void deserialize(NodeReferences refs, InputStream stream) throws Exception
NodeReferences
object from the given
binary stream
.refs
- object to deserializestream
- the stream where the object should be deserialized fromException
- if an error occurs during the deserializationserialize(NodeReferences, OutputStream)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.