Class SerializableCodec<T extends Serializable>

java.lang.Object
org.nuxeo.lib.stream.codec.SerializableCodec<T>
All Implemented Interfaces:
Codec<T>

public class SerializableCodec<T extends Serializable> extends Object implements Codec<T>
Java Serializable encoding. It is highly recommended to use Externalizable, for performance reason.
Since:
10.2
  • Field Details

  • Constructor Details

    • SerializableCodec

      public SerializableCodec()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Codec
      Returns the codec name
      Specified by:
      getName in interface Codec<T extends Serializable>
    • encode

      public byte[] encode(T object)
      Description copied from interface: Codec
      Encodes the object returns a byte array representation.
      Specified by:
      encode in interface Codec<T extends Serializable>
    • decode

      public T decode(byte[] data)
      Description copied from interface: Codec
      Decodes the byte array returns an object.
      Specified by:
      decode in interface Codec<T extends Serializable>