public class ThrowablePofSerializer extends Object implements PofSerializer
Throwable to/from a POF stream.
This serializer is provides a catch-all mechanism for serializing exceptions. Any deserialized exception will loose type information, and simply be represented as a PortableException. The basic detail information of the exception is retained.
PortableException and this class work asymmetrically to provide the serialization routines for exceptions.
| Constructor and Description |
|---|
ThrowablePofSerializer()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public void serialize(PofWriter out, Object o) throws 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 serializeIOException - if an I/O error occurspublic Object deserialize(PofReader in) throws 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 stateIOException - if an I/O error occurs