Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.io.pof
Class EnumPofSerializer

`java.lang.Object
com.tangosol.io.pof.EnumPofSerializer`

All Implemented Interfaces:
  PofSerializer

      public class EnumPofSerializer

extends java.lang.Object
implements PofSerializer

`PofSerializer` implementation that can be used to serialize all enum values.

Author:
  as 2008.10.24

Constructor Summary
`EnumPofSerializer()`

Method Summary
`java.lang.Object` | `deserialize(PofReader reader)` Deserialize a user type instance from a POF stream by reading its state using the specified PofReader object.
`void` | `serialize(PofWriter writer, java.lang.Object o)` Serialize a user type instance to a POF stream by writing its state using the specified PofWriter object.

Constructor Detail

### EnumPofSerializer

    public EnumPofSerializer()

Method Detail

### serialize

    public void serialize(PofWriter writer,
                          java.lang.Object o)
                   throws java.io.IOException

  Serialize a user type instance to a POF stream by writing its state using the specified PofWriter object. 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:
    `writer` - the PofWriter with which to write the object's state
    `o` - the object to serialize
  Throws:
    `java.io.IOException` - if an I/O error occurs

### deserialize

    public java.lang.Object deserialize(PofReader reader)
                                 throws java.io.IOException

  Deserialize a user type instance from a POF stream by reading its state using the specified PofReader object. 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:
    `reader` - the PofReader with which to read the object's state
  Returns:
    the deserialized user type instance
  Throws:
    `java.io.IOException` - if an I/O error occurs

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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