Package com.tangosol.io.pof.reflect
Class Codecs.ArrayCodec
- java.lang.Object
-
- com.tangosol.io.pof.reflect.Codecs.AbstractCodec
-
- com.tangosol.io.pof.reflect.Codecs.ArrayCodec
-
- All Implemented Interfaces:
Codec
- Enclosing class:
- Codecs
public static class Codecs.ArrayCodec extends Codecs.AbstractCodec
Implementation ofCodecthat delegates toPofReader.readObjectArray(int, Object[])andPofWriter.writeObjectArray(int, Object[])to deserialize and serialize an object.- Since:
- 3.7.1
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<?>f_clzComponentClass that represents the type for each element in the array that will be serialized and deserialized into.
-
Constructor Summary
Constructors Constructor Description ArrayCodec(Class<?> clzComponent)Construct an ArrayCodec.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectdecode(PofReader in, int index)Deserialize an object from the providedPofReader.-
Methods inherited from class com.tangosol.io.pof.reflect.Codecs.AbstractCodec
encode, newInstance
-
-
-
-
Field Detail
-
f_clzComponent
protected Class<?> f_clzComponent
Class that represents the type for each element in the array that will be serialized and deserialized into.
-
-
Constructor Detail
-
ArrayCodec
public ArrayCodec(Class<?> clzComponent)
Construct an ArrayCodec.- Parameters:
clzComponent- the Class type for each element in the array
-
-
Method Detail
-
decode
public Object decode(PofReader in, int index) throws IOException
Deserialize an object from the providedPofReader. Implementing this interface allows introducing specific return implementations.- Parameters:
in- the PofReader to read fromindex- the index of the POF property to deserialize- Returns:
- a specific implementation of the POF property
- Throws:
IOException- if an I/O error occurs
-
-