Package org.nuxeo.lib.stream.codec
Interface Codec<T>
- All Known Implementing Classes:
AvroBinaryCodec
,AvroConfluentCodec
,AvroJsonCodec
,AvroMessageCodec
,AvroRecordCodec
,NoCodec
,SerializableCodec
public interface Codec<T>
Convert an object to/from byte array. The implementation should be thread safe.
- Since:
- 10.2
-
Method Summary
-
Method Details
-
getName
String getName()Returns the codec name -
encode
Encodes the object returns a byte array representation. -
decode
Decodes the byte array returns an object.- Throws:
IllegalArgumentException
- if data are invalid.
-