org.apache.droids.helper
Class StAX

Package class diagram package StAX
java.lang.Object
  extended by org.apache.droids.helper.Loggable
      extended by org.apache.droids.helper.StAX

public class StAX
extends Loggable

Helper class that eases the usage of StAX in your plugins.


Field Summary
 
Fields inherited from class org.apache.droids.helper.Loggable
log
 
Constructor Summary
StAX()
          Easy helper to get StAX based parser and writer.
 
Method Summary
 javax.xml.stream.XMLEventFactory getEventFactory()
          Get the ready to used EventFactory
 javax.xml.stream.XMLEventReader getEventParser(InputStream in)
          Get an event Parser based on the incoming stream
 javax.xml.stream.XMLStreamReader getParser(InputStream in)
          Get a stream Parser based on the incoming stream
 javax.xml.stream.XMLStreamWriter getStreamWriter(OutputStream stream)
          Get a stream writer based on the incoming stream
 javax.xml.stream.XMLEventWriter getWriter(OutputStream stream)
          Get an event writer based on the incoming stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StAX

public StAX()
Easy helper to get StAX based parser and writer.

Method Detail

getWriter

public javax.xml.stream.XMLEventWriter getWriter(OutputStream stream)
                                          throws javax.xml.stream.XMLStreamException
Get an event writer based on the incoming stream

Parameters:
stream - the stream we want to write to
Returns:
ready to use event writer
Throws:
javax.xml.stream.XMLStreamException

getStreamWriter

public javax.xml.stream.XMLStreamWriter getStreamWriter(OutputStream stream)
                                                 throws javax.xml.stream.XMLStreamException
Get a stream writer based on the incoming stream

Parameters:
stream - the stream we want to write to
Returns:
ready to use stream writer
Throws:
javax.xml.stream.XMLStreamException

getEventParser

public javax.xml.stream.XMLEventReader getEventParser(InputStream in)
                                               throws javax.xml.stream.XMLStreamException
Get an event Parser based on the incoming stream

Parameters:
in - the stream we want to read from
Returns:
ready to use event parser
Throws:
javax.xml.stream.XMLStreamException

getParser

public javax.xml.stream.XMLStreamReader getParser(InputStream in)
                                           throws javax.xml.stream.XMLStreamException
Get a stream Parser based on the incoming stream

Parameters:
in - the stream we want to read from
Returns:
ready to use stream parser
Throws:
javax.xml.stream.XMLStreamException

getEventFactory

public javax.xml.stream.XMLEventFactory getEventFactory()
Get the ready to used EventFactory

Returns:
ready to used EventFactory


Copyright © 2008 The Apache Software Foundation