|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-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.ExternalizablePofSerializer
public class ExternalizablePofSerializer
PofSerializer implementation that supports the serialization and deserialization of any class that implements Externalizable to and from a POF stream. This implementation is provided to ease migration of Externalizable implementations to support the POF stream format.
Warning: This implementation does not correctly support all possible Externalizable implementations. It will likely support most simple Externalizable 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 ObjectInput and ObjectOutput stream objects passed to the Externalizable.readExternal(java.io.ObjectInput) )} and Externalizable.writeExternal(java.io.ObjectOutput) 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_nTypeIdThe 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 | |
|---|---|
ExternalizablePofSerializer(int nTypeId)Create a new ExternalizablePofSerializer for the user type with the given type identifier. |
|
| Method Summary | |
|---|---|
java.lang.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, java.lang.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 ExternalizablePofSerializer(int nTypeId)
nTypeId - the user type identifier| Method Detail |
|---|
public void serialize(PofWriter out,
java.lang.Object o)
throws java.io.IOException
An implementation of PofSerializer is required to follow the following steps in sequence for writing out an object of a user type:
PofWriter.setVersionId(int).PofWriter.writeRemainder(com.tangosol.util.Binary).serialize in interface PofSerializerout - the PofWriter with which to write the object's stateo - the object to serializejava.io.IOException - if an I/O error occurs
public java.lang.Object deserialize(PofReader in)
throws java.io.IOException
An implementation of PofSerializer is required to follow the following steps in sequence for reading in an object of a user type:
PofReader.getVersionId().PofReader.registerIdentity(java.lang.Object) with the new instance prior to reading any properties which are user type instances themselves.PofReader.readRemainder().deserialize in interface PofSerializerin - the PofReader with which to read the object's statejava.io.IOException - if an I/O error occurs
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||