Qizx fe-4.4p2 API

com.qizx.api.util
Class PullStreamConverter

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

public class PullStreamConverter
extends Object

Utility for conversion of an XMLPullStream input.


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

© 2010 Axyana Software