|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.io.pof.PofHelper
com.tangosol.io.pof.ExternalizableLitePofSerializer
public class ExternalizableLitePofSerializer
PofSerializer
implementation that supports the serialization and deserialization of any class that implements ExternalizableLite
to and from a POF stream. This implementation is provided to ease migration of ExternalizableLite implementations to support the POF stream format. <p/> Warning: This implementation does not correctly support all possible ExternalizableLite implementations. It will likely support most simple ExternalizableLite implementations that read and write their properties is a manner analogous to a proper implementation of the PortableObject interface. Incompatibilities are likely when the user type does direct (or indirect) binary-level I/O through the DataInput and DataOutput stream objects passed to the ExternalizableLite.readExternal(java.io.DataInput)
and ExternalizableLite.writeExternal(java.io.DataOutput)
methods respectively. Note that the helper methods on ExternalizableHelper are POF aware, and thus safe to use within the readExternal and writeExternal methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tangosol.io.pof.PofHelper |
---|
PofHelper.ReadableEntrySetMap, PofHelper.WriteableEntrySetMap |
Field Summary | |
---|---|
protected int |
m_nTypeId The type identifier of the user type to serialize and deserialize. |
Fields inherited from class com.tangosol.io.pof.PofHelper |
---|
BIGDECIMAL_ZERO, BIGINTEGER_MAX_LONG, BIGINTEGER_MIN_LONG, BINARY_EMPTY, BOOLEAN_ARRAY_EMPTY, BYTE_ARRAY_EMPTY, CHAR_ARRAY_EMPTY, COLLECTION_EMPTY, DOUBLE_ARRAY_EMPTY, FLOAT_ARRAY_EMPTY, INT_ARRAY_EMPTY, LONG_ARRAY_EMPTY, OBJECT_ARRAY_EMPTY, SHORT_ARRAY_EMPTY |
Constructor Summary | |
---|---|
ExternalizableLitePofSerializer(int nTypeId) Create a new ExternalizableLitePofSerializer for the user type with the given type identifier. |
Method Summary | |
---|---|
Object |
deserialize(PofReader in) Deserialize a user type instance from a POF stream by reading its state using the specified PofReader object. |
void |
serialize(PofWriter out, Object o) Serialize a user type instance to a POF stream by writing its state using the specified PofWriter object. |
Field Detail |
---|
protected final int m_nTypeId
Constructor Detail |
---|
public ExternalizableLitePofSerializer(int nTypeId)
nTypeId
- the user type identifierMethod Detail |
---|
public void serialize(PofWriter out, Object o) throws IOException
PofWriter.setVersionId(int)
.PofWriter.writeRemainder(com.tangosol.util.Binary)
.serialize
in interface PofSerializer
out
- the PofWriter with which to write the object's stateo
- the object to serializeIOException
- if an I/O error occurspublic Object deserialize(PofReader in) throws IOException
PofWriter.getVersionId()
.PofReader.readRemainder()
.deserialize
in interface PofSerializer
in
- the PofReader with which to read the object's stateIOException
- if an I/O error occurs
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |