Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.io.pof
Class SafeConfigurablePofContext.JavaPofSerializer

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.io.pof.SafeConfigurablePofContext.JavaPofSerializer

All Implemented Interfaces:
PofSerializer
Enclosing class:
SafeConfigurablePofContext

public class SafeConfigurablePofContext.JavaPofSerializer
extends ExternalizableHelper
implements PofSerializer

Serializer used for Serializable and ExternalizableLite objects.


Constructor Summary
SafeConfigurablePofContext.JavaPofSerializer()
           

 

Method Summary
 Object deserialize(PofReader in)
          Deserialize a user type instance from a POF stream by reading its state using the specified PofReader object.
protected  void register(Object o)
          Register a class as having been encountered by the serializer.
 void serialize(PofWriter out, Object o)
          Serialize a user type instance to a POF stream by writing its state using the specified PofWriter object.

 

Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString

 

Constructor Detail

SafeConfigurablePofContext.JavaPofSerializer

public SafeConfigurablePofContext.JavaPofSerializer()

Method Detail

serialize

public void serialize(PofWriter out,
                      Object o)
               throws IOException
Serialize a user type instance to a POF stream by writing its state using the specified PofWriter object. <p/> An implementation of PofSerializer is required to follow the following steps in sequence for writing out an object of a user type:
  1. If the object is evolvable, the implementation must set the version by calling PofWriter.setVersionId(int).
  2. The implementation may write any combination of the properties of the user type by using the "write" methods of the PofWriter, but it must do so in the order of the property indexes.
  3. After all desired properties of the user type have been written, the implementation must terminate the writing of the user type by calling PofWriter.writeRemainder(com.tangosol.util.Binary).
Specified by:
serialize in interface PofSerializer
Parameters:
out - the PofWriter with which to write the object's state
o - the object to serialize
Throws:
IOException - if an I/O error occurs

deserialize

public Object deserialize(PofReader in)
                   throws IOException
Deserialize a user type instance from a POF stream by reading its state using the specified PofReader object. <p/> An implementation of PofSerializer is required to follow the following steps in sequence for reading in an object of a user type:
  1. If the object is evolvable, the implementation must get the version by calling PofWriter.getVersionId().
  2. The implementation may read any combination of the properties of the user type by using "read" methods of the PofReader, but it must do so in the order of the property indexes.
  3. After all desired properties of the user type have been read, the implementation must terminate the reading of the user type by calling PofReader.readRemainder().
Specified by:
deserialize in interface PofSerializer
Parameters:
in - the PofReader with which to read the object's state
Returns:
the deserialized user type instance
Throws:
IOException - if an I/O error occurs

register

protected void register(Object o)
Register a class as having been encountered by the serializer.
Parameters:
o - an object that is being serialized or has been deserialized

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.