decode
public <T> T decode(byte[] binary,
java.lang.Class<? extends T> rootClazz)
throws ParseException
Decodes valid JABB objects, i.e. binary representations of properly annotated objects as well as most basic
types, like String, Integer, primitive types and arrays of primitives.
- Specified by:
decode
in interface ObjectDecoder
- Type Parameters:
T
- root class of expected type
- Parameters:
binary
- binary representation of JABB object or basic type
rootClazz
- object class matching the binary
- Returns:
- instance of type T
- Throws:
ParseException
- if the byte array can't be parsed for any reason