Package io.datarouter.bytes
Interface Codec<A,B>
- All Known Implementing Classes:
ByteArraysCodec,Codec.FunctionalCodec,Codec.NullPassthroughCodec
public interface Codec<A,B>
A bi-directional Function where encoding then decoding should typically return the original value.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCodec.FunctionalCodec<A,B>Build a Codec from two Functions.static classCodec.NullPassthroughCodec<A,B>Skips the inner codecs when provided values are null, directly returning null. -
Method Summary
-
Method Details
-
encode
-
decode
-
encodeAndDecode
Useful for testing -
of
-