Package org.nuxeo.lib.stream.codec
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>
JavaSerializable
encoding. It is highly recommended to useExternalizable
, for performance reason.- Since:
- 10.2
-
-
Constructor Summary
Constructors Constructor Description SerializableCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
decode(byte[] data)
Decodes the byte array returns an object.byte[]
encode(T object)
Encodes the object returns a byte array representation.String
getName()
Returns the codec name
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Codec
Returns the codec name- Specified by:
getName
in interfaceCodec<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 interfaceCodec<T extends Serializable>
-
-