org.apache.jackrabbit.core.state.util
Class Serializer

java.lang.Object
  extended byorg.apache.jackrabbit.core.state.util.Serializer

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 Summary
Serializer()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializer

public Serializer()
Method Detail

serialize

public static void serialize(NodeState state,
                             OutputStream stream)
                      throws Exception
Serializes the specified NodeState object to the given binary stream.

Parameters:
state - state to serialize
stream - the stream where the state 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 a NodeState object from the given binary stream.

Parameters:
state - state to deserialize
stream - the stream where the state 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 specified PropertyState object to the given binary stream. Binary values are stored in the specified BLOBStore.

Parameters:
state - state to serialize
stream - the stream where the state should be serialized to
blobStore - 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 a PropertyState object from the given binary stream. Binary values are retrieved from the specified BLOBStore.

Parameters:
state - state to deserialize
stream - the stream where the state should be deserialized from
blobStore - 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 specified NodeReferences object to the given binary stream.

Parameters:
refs - object to serialize
stream - 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 a NodeReferences object from the given binary stream.

Parameters:
refs - object to deserialize
stream - the stream where the object should be deserialized from
Throws:
Exception - if an error occurs during the deserialization
See Also:
serialize(NodeReferences, OutputStream)


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.