Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Qizx/open 4.1 API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.qizx.api.util
Class PullStreamConverter

    java.lang.Object
      com.qizx.api.util.PullStreamConverter

    public class PullStreamConverter

extends Object

Utility for conversion of an XMLPullStream input.

- Conversion into a push stream: (`convertTree(com.qizx.api.XMLPullStream, com.qizx.api.XMLPushStream)` reads a portion of the input stream that form a complete element tree.
- Building an in-memory Node representation: (`buildNode(com.qizx.api.XMLPullStream)`) reads a portion of the input stream that form a complete element and its subtree, or a leaf node, and builds a Node.

Method Summary
`static Node` | `buildNode(XMLPullStream in)` Directly builds an internal Node representation from a XML input stream.
`static int` | `convertTree(XMLPullStream in, XMLPushStream out)` Reads events from the input stream until a complete well-balanced tree is sent to the output stream.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### convertTree

    public static int convertTree(XMLPullStream in,
                                  XMLPushStream out)
                           throws DataModelException

  Reads events from the input stream until a complete well-balanced tree is sent to the output stream. Assumes that the current event points to the beginning of the tree. This method allows for incremental read of sub-trees.

  Parameters:
    `in` - an input stream of XML events
    `out` - an output for XML events
  Returns:
    the code of the event following the tree
  Throws:
    `DataModelException` - if thrown by the input stream

### buildNode

    public static Node buildNode(XMLPullStream in)
                          throws DataModelException

  Directly builds an internal Node representation from a XML input stream. Reads exactly enough events to build a balanced tree.

  Parameters:
    `in` - XML input stream
  Returns:
    the Node built
  Throws:
    `DataModelException` - if thrown by the input stream

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2010 Axyana Software
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD