Package org.joda.beans.ser.bin
Class JodaBeanBinReader
- java.lang.Object
-
- org.joda.beans.ser.bin.JodaBeanBinReader
-
public class JodaBeanBinReader extends Object
Provides the ability for a Joda-Bean to read from binary formats.This class is immutable and may be used from multiple threads.
The binary formats are defined by
JodaBeanBinWriter
.
-
-
Constructor Summary
Constructors Constructor Description JodaBeanBinReader(JodaBeanSer settings)
Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.static String
visualize(byte[] input)
Visualizes the binary data.
-
-
-
Constructor Detail
-
JodaBeanBinReader
public JodaBeanBinReader(JodaBeanSer settings)
Creates an instance.- Parameters:
settings
- the settings, not null
-
-
Method Detail
-
visualize
public static String visualize(byte[] input)
Visualizes the binary data.- Parameters:
input
- the input bytes, not null- Returns:
- the visualization
-
read
public Bean read(byte[] input)
Reads and parses to a bean.- Parameters:
input
- the input bytes, not null- Returns:
- the bean, not null
-
read
public <T> T read(byte[] input, Class<T> rootType)
Reads and parses to a bean.- Type Parameters:
T
- the root type- Parameters:
input
- the input bytes, not nullrootType
- the root type, not null- Returns:
- the bean, not null
-
read
public Bean read(InputStream input)
Reads and parses to a bean.- Parameters:
input
- the input reader, not null- Returns:
- the bean, not null
-
read
public <T> T read(InputStream input, Class<T> rootType)
Reads and parses to a bean.- Type Parameters:
T
- the root type- Parameters:
input
- the input stream, not nullrootType
- the root type, not null- Returns:
- the bean, not null
-
-