Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.io.pof.reflect
Interface Codec

All Known Implementing Classes:
Codecs.AbstractCodec, Codecs.DefaultCodec

public interface Codec

A Codec provides an interception point for any specific code that needs to be executed pre or post (de)serialization. In the case of deserialization this could be to return a concrete implementation and with serialization this could be to explicitly call a specific method on PofWriter that is not carried out by PofWriter.writeObject(int, Object).

Since:
3.7.1
Author:
hr

Method Summary
 java.lang.Object decode(PofReader in, int iProp)
          Deserialize an object from the provided PofReader.
 void encode(PofWriter out, int iProp, java.lang.Object value)
          Serialize an object using the provided PofWriter.

 

Method Detail

decode

java.lang.Object decode(PofReader in,
                        int iProp)
                        throws java.io.IOException
Deserialize an object from the provided PofReader. Implementing this interface allows introducing specific return implementations.
Parameters:
in - the PofReader to read from
iProp - the index of the POF property to deserialize
Returns:
a specific implementation of the POF property
Throws:
java.io.IOException - if an I/O error occurs

encode

void encode(PofWriter out,
            int iProp,
            java.lang.Object value)
            throws java.io.IOException
Serialize an object using the provided PofWriter.
Parameters:
out - the PofWriter to read from
iProp - the index of the POF property to serialize
value - the value to serialize
Throws:
java.io.IOException - if an I/O error occurs

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


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