public static class Codecs.ArrayCodec extends Codecs.AbstractCodec
Codec
that delegates to
PofReader.readObjectArray(int, Object[])
and
PofWriter.writeObjectArray(int, Object[])
to deserialize and serialize
an object.Modifier and Type | Field and Description |
---|---|
protected Class<?> |
f_clzComponent
Class that represents the type for each element in the array that
will be serialized and deserialized into.
|
Constructor and Description |
---|
ArrayCodec(Class<?> clzComponent)
Construct an ArrayCodec.
|
Modifier and Type | Method and Description |
---|---|
Object |
decode(PofReader in,
int index)
Deserialize an object from the provided
PofReader . |
encode, newInstance
protected Class<?> f_clzComponent
public ArrayCodec(Class<?> clzComponent)
clzComponent
- the Class type for each element in the arraypublic Object decode(PofReader in, int index) throws IOException
PofReader
.
Implementing this interface allows introducing specific return
implementations.in
- the PofReader to read fromindex
- the index of the POF property to deserializeIOException
- if an I/O error occurs