Class JodaBeanXmlReader


  • public class JodaBeanXmlReader
    extends java.lang.Object
    Provides the ability for a Joda-Bean to read from XML.

    The XML format is defined by JodaBeanXmlWriter.

    This class contains mutable state and cannot be used from multiple threads. A new instance must be created for each message.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      Bean read​(java.io.Reader input)
      Reads and parses to a bean.
      <T> T read​(java.io.Reader input, java.lang.Class<T> rootType)
      Reads and parses to a bean.
      Bean read​(java.lang.String input)
      Reads and parses to a bean.
      <T> T read​(java.lang.String input, java.lang.Class<T> rootType)
      Reads and parses to a bean.
      • Methods inherited from class java.lang.Object

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

      • JodaBeanXmlReader

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

      • read

        public Bean read​(java.lang.String input)
        Reads and parses to a bean.
        Parameters:
        input - the input string, not null
        Returns:
        the bean, not null
      • read

        public <T> T read​(java.lang.String input,
                          java.lang.Class<T> rootType)
        Reads and parses to a bean.
        Type Parameters:
        T - the root type
        Parameters:
        input - the input string, 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
      • read

        public Bean read​(java.io.Reader 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.Reader input,
                          java.lang.Class<T> rootType)
        Reads and parses to a bean.
        Type Parameters:
        T - the root type
        Parameters:
        input - the input reader, not null
        rootType - the root type, not null
        Returns:
        the bean, not null