public class JodaBeanBinReader extends Object
The binary format is defined by JodaBeanBinWriter.
This class contains mutable state and cannot be used from multiple threads. A new instance must be created for each message.
| Constructor and Description |
|---|
JodaBeanBinReader(JodaBeanSer settings)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
isArray(int typeByte) |
protected static boolean |
isIntegral(int typeByte) |
protected static boolean |
isMap(int typeByte) |
protected static boolean |
isString(int typeByte) |
Bean |
read(byte[] input)
Reads and parses to a bean.
|
<T> T |
read(byte[] input,
Class<T> rootType)
Reads and parses to a bean.
|
Bean |
read(InputStream input)
Reads and parses to a bean.
|
<T> T |
read(InputStream input,
Class<T> rootType)
Reads and parses to a bean.
|
protected static String |
toHex(int b)
Converts a byte to a hex string for debugging.
|
static String |
visualize(byte[] input)
Visualizes the binary data, writing to system out.
|
public JodaBeanBinReader(JodaBeanSer settings)
settings - the settings, not nullpublic static String visualize(byte[] input)
input - the input bytes, not nullpublic Bean read(byte[] input)
input - the input bytes, not nullpublic <T> T read(byte[] input,
Class<T> rootType)
T - the root typeinput - the input bytes, not nullrootType - the root type, not nullpublic Bean read(InputStream input)
input - the input reader, not nullpublic <T> T read(InputStream input, Class<T> rootType)
T - the root typeinput - the input stream, not nullrootType - the root type, not nullprotected static String toHex(int b)
b - the byteprotected static boolean isMap(int typeByte)
throws IOException
IOExceptionprotected static boolean isArray(int typeByte)
throws IOException
IOExceptionprotected static boolean isString(int typeByte)
throws IOException
IOExceptionprotected static boolean isIntegral(int typeByte)
throws IOException
IOExceptionCopyright © 2007–2017 Joda.org. All rights reserved.