public static class Codecs.CollectionCodec extends Codecs.AbstractCodec
Codec
that delegates to
PofReader.readCollection(int, Collection)
and
PofWriter.writeCollection(int, Collection)
to deserialize and
serialize an object.Modifier and Type | Field | Description |
---|---|---|
protected Class<? extends Collection<Object>> |
f_clzCol |
Class that represents the Collection implementation that will be
serialized and deserialized into.
|
Constructor | Description |
---|---|
CollectionCodec(Class<? extends Collection<Object>> clzCol) |
Construct a CollectionCodec.
|
Modifier and Type | Method | Description |
---|---|---|
Object |
decode(PofReader in,
int index) |
Deserialize an object from the provided
PofReader . |
encode, newInstance
protected Class<? extends Collection<Object>> f_clzCol
public CollectionCodec(Class<? extends Collection<Object>> clzCol)
clzCol
- the Class that represents the Collection implementation
that will be serialized and deserialized intopublic 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