Class XJdfParser<T>

  • Type Parameters:
    T - The root node this parser applies to. Valid values are 'XJDF' and 'XJMF'

    public class XJdfParser<T>
    extends java.lang.Object
    This class is a parser based on the XJDF Schema.
    • Constructor Summary

      Constructors 
      Constructor Description
      XJdfParser()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T readXml​(byte[] bytes)
      Read an XML byte array and converts it to an object tree.
      T readXml​(java.io.InputStream inputStream)
      Read an XML input stream and converts it to an object tree.
      byte[] writeXml​(T node)
      Write an XJDF object tree to a binary array.
      void writeXml​(T node, java.io.OutputStream outputStream)
      Write an XJDF object tree to a binary output stream.
      • Methods inherited from class java.lang.Object

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

      • readXml

        public final T readXml​(byte[] bytes)
                        throws XJdfParseException
        Read an XML byte array and converts it to an object tree.
        Parameters:
        bytes - The XML byte array to be parsed.
        Returns:
        The parsed object tree.
        Throws:
        XJdfParseException
      • readXml

        public final T readXml​(java.io.InputStream inputStream)
                        throws XJdfParseException
        Read an XML input stream and converts it to an object tree.
        Parameters:
        inputStream - The XML input stream to be parsed.
        Returns:
        The parsed object tree.
        Throws:
        XJdfParseException
      • writeXml

        public final byte[] writeXml​(T node)
                              throws XJdfParseException
        Write an XJDF object tree to a binary array.
        Parameters:
        node - Object tree to be written.
        Returns:
        The XJDF Document as xml byte array.
        Throws:
        XJdfParseException
      • writeXml

        public final void writeXml​(T node,
                                   java.io.OutputStream outputStream)
                            throws XJdfParseException
        Write an XJDF object tree to a binary output stream.
        Parameters:
        node - Object tree to be written.
        outputStream - The output stream the XML stream is written to.
        Throws:
        XJdfParseException