Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.io
Interface Serializer

All Known Subinterfaces:
PofContext
All Known Implementing Classes:
ConfigurablePofContext, DefaultSerializer, NullImplementation.NullPofContext, SafeConfigurablePofContext, SimplePofContext

public interface Serializer

The Serializer interface provides the capability of reading and writing a Java object from and to an in-memory buffer. <p/> Serializer implementations should implement the ClassLoaderAware interface if they need access to a ClassLoader. However, to support hot-deploying containers, it is important that a Serializer not hold any strong references to that ClassLoader, or to any Class objects obtained from that ClassLoader.

Since:
Coherence 3.2
Author:
cp/jh 2007.07.21
See Also:
ReadBuffer, WriteBuffer

Method Summary
 Object deserialize(ReadBuffer.BufferInput in)
          Deserialize an object from a ReadBuffer by reading its state using the specified BufferInput object.
 void serialize(WriteBuffer.BufferOutput out, Object o)
          Serialize an object to a WriteBuffer by writing its state using the specified BufferOutput object.

 

Method Detail

serialize

void serialize(WriteBuffer.BufferOutput out,
               Object o)
               throws IOException
Serialize an object to a WriteBuffer by writing its state using the specified BufferOutput object.
Parameters:
out - the BufferOutput with which to write the object's state
o - the object to serialize
Throws:
IOException - if an I/O error occurs

deserialize

Object deserialize(ReadBuffer.BufferInput in)
                   throws IOException
Deserialize an object from a ReadBuffer by reading its state using the specified BufferInput object.
Parameters:
in - the BufferInput with which to read the object's state
Returns:
the deserialized user type instance
Throws:
IOException - if an I/O error occurs

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.