public interface OsonConverter
A converter which provides the conversion methods of POJO to OSON bytes and vice versa.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getObject(byte[] osonBytes,
java.lang.Class<?> type)
Converts the given oson bytes into an instance of
the type provided.
|
byte[] |
getOson(java.lang.Object object)
Converts the given POJO to OSON bytes.
|
byte[] getOson(java.lang.Object object)
throws java.lang.IllegalStateException
java - Object to be converted to OSON bytes. Maybe null.java.lang.IllegalStateException - if conversion failsjava.lang.Object getObject(byte[] osonBytes,
java.lang.Class<?> type)
throws java.lang.IllegalStateException
ososBytes - to be converted to a POJO. Maybe null.type - of the expected POJO. Not null.java.lang.IllegalStateException - if the type mapping is wrong or conversion fails