Package com.tangosol.io.pof.reflect
Interface Codec
-
- All Known Implementing Classes:
Codecs.AbstractCodec
,Codecs.ArrayCodec
,Codecs.CollectionCodec
,Codecs.DefaultCodec
,Codecs.LongArrayCodec
,Codecs.MapCodec
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 onPofWriter
that is not carried out byPofWriter.writeObject(int, Object)
.- Since:
- 3.7.1
- Author:
- hr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
decode(PofReader in, int iProp)
Deserialize an object from the providedPofReader
.void
encode(PofWriter out, int iProp, Object value)
Serialize an object using the providedPofWriter
.
-
-
-
Method Detail
-
decode
Object decode(PofReader in, int iProp) throws IOException
Deserialize an object from the providedPofReader
. Implementing this interface allows introducing specific return implementations.- Parameters:
in
- the PofReader to read fromiProp
- the index of the POF property to deserialize- Returns:
- a specific implementation of the POF property
- Throws:
IOException
- if an I/O error occurs
-
encode
void encode(PofWriter out, int iProp, Object value) throws IOException
Serialize an object using the providedPofWriter
.- Parameters:
out
- the PofWriter to read fromiProp
- the index of the POF property to serializevalue
- the value to serialize- Throws:
IOException
- if an I/O error occurs
-
-