Class Codecs.MapCodec

java.lang.Object
com.tangosol.io.pof.reflect.Codecs.AbstractCodec
com.tangosol.io.pof.reflect.Codecs.MapCodec
All Implemented Interfaces:
Codec
Enclosing class:
Codecs

public static class Codecs.MapCodec extends Codecs.AbstractCodec
Implementation of Codec that delegates to PofReader.readMap(int, Map) and PofWriter.writeMap(int, Map) to deserialize and serialize an object.
Since:
3.7.1
  • Field Details

    • f_clzMap

      protected Class<? extends Map<Object,Object>> f_clzMap
      Class that represents the Map implementation that will be serialized and deserialized into.
  • Constructor Details

    • MapCodec

      public MapCodec(Class<? extends Map<Object,Object>> clzMap)
      Construct a MapCodec.
      Parameters:
      clzMap - the Class that represents the Map implementation that will be serialized and deserialized into
  • Method Details

    • decode

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