Class 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 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 null
        rootType - 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 null
        rootType - the root type, not null
        Returns:
        the bean, not null