Class JodaBeanBinReader


  • public class JodaBeanBinReader
    extends java.lang.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.

    • 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, java.lang.Class<T> rootType)
      Reads and parses to a bean.
      Bean read​(java.io.InputStream input)
      Reads and parses to a bean.
      <T> T read​(java.io.InputStream input, java.lang.Class<T> rootType)
      Reads and parses to a bean.
      static java.lang.String visualize​(byte[] input)
      Visualizes the binary data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JodaBeanBinReader

        public JodaBeanBinReader​(JodaBeanSer settings)
        Creates an instance.
        Parameters:
        settings - the settings, not null
    • Method Detail

      • visualize

        public static java.lang.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,
                          java.lang.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​(java.io.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​(java.io.InputStream input,
                          java.lang.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