public interface Decoder<T>
| Modifier and Type | Method and Description |
|---|---|
T |
decode(byte[] bytes)
Decode the given bytes into an message object of type M.
|
boolean |
willDecode(java.lang.String contentType)
Answer whether the given content type can be decoded into an object of type T.
|
T decode(byte[] bytes) throws DecodeException
bytes - the bytes to be decoded.DecodeException - if the message decoding failsboolean willDecode(java.lang.String contentType)
contentType - the content type to be decoded.