Constructor and Description |
---|
CompositeCodec(Codec defaultCodec) |
CompositeCodec(java.util.Map<java.lang.Class<?>,Codec> delegates,
Codec defaultCodec) |
Modifier and Type | Method and Description |
---|---|
<T> T |
decode(byte[] bytes,
java.lang.Class<T> type)
Decode an object of a given type
|
<T> T |
decode(java.io.InputStream inputStream,
java.lang.Class<T> type)
Decode an object of a given type
|
byte[] |
encode(java.lang.Object object)
Encode an object to a byte array
|
void |
encode(java.lang.Object object,
java.io.OutputStream outputStream)
Encode (encode) an object to an OutputStream
|
public CompositeCodec(java.util.Map<java.lang.Class<?>,Codec> delegates, Codec defaultCodec)
public CompositeCodec(Codec defaultCodec)
public void encode(java.lang.Object object, java.io.OutputStream outputStream) throws java.io.IOException
Codec
public byte[] encode(java.lang.Object object) throws java.io.IOException
Codec
public <T> T decode(java.io.InputStream inputStream, java.lang.Class<T> type) throws java.io.IOException
Codec
public <T> T decode(byte[] bytes, java.lang.Class<T> type) throws java.io.IOException
Codec