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>
JavaSerializableencoding. 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 Tdecode(byte[] data)Decodes the byte array returns an object.byte[]encode(T object)Encodes the object returns a byte array representation.StringgetName()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:CodecReturns the codec name- Specified by:
getNamein interfaceCodec<T extends Serializable>
-
encode
public byte[] encode(T object)
Description copied from interface:CodecEncodes the object returns a byte array representation.- Specified by:
encodein interfaceCodec<T extends Serializable>
-
-