javanet.staxutils
Class XMLStreamEventWriter

java.lang.Object
  extended by javanet.staxutils.BaseXMLEventWriter
      extended by javanet.staxutils.XMLStreamEventWriter
All Implemented Interfaces:
XMLEventConsumer, XMLEventWriter

public class XMLStreamEventWriter
extends BaseXMLEventWriter

XMLEventWriter that writes events to a XMLStreamWriter.

Version:
$Revision: 1.1 $
Author:
Christian Niles

Field Summary
 
Fields inherited from class javanet.staxutils.BaseXMLEventWriter
attrBuff, closed, factory, lastStart, nsBuff, nsStack
 
Constructor Summary
XMLStreamEventWriter(XMLStreamWriter writer)
          Constructs a XMLEventStreamWriter that writes events to the given stream.
 
Method Summary
 void close()
           
 void flush()
           
protected  void sendEvent(XMLEvent event)
          Called by the methods of this class to write the event to the stream.
 
Methods inherited from class javanet.staxutils.BaseXMLEventWriter
add, add, cacheAttribute, cacheNamespace, getNamespaceContext, getPrefix, peekNamespaceStack, popNamespaceStack, pushNamespaceStack, setDefaultNamespace, setNamespaceContext, setPrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLStreamEventWriter

public XMLStreamEventWriter(XMLStreamWriter writer)
Constructs a XMLEventStreamWriter that writes events to the given stream.

Parameters:
writer - The XMLStreamWriter to which the events will be written.
Method Detail

flush

public void flush()
           throws XMLStreamException
Specified by:
flush in interface XMLEventWriter
Overrides:
flush in class BaseXMLEventWriter
Throws:
XMLStreamException

close

public void close()
           throws XMLStreamException
Specified by:
close in interface XMLEventWriter
Overrides:
close in class BaseXMLEventWriter
Throws:
XMLStreamException

sendEvent

protected void sendEvent(XMLEvent event)
                  throws XMLStreamException
Description copied from class: BaseXMLEventWriter
Called by the methods of this class to write the event to the stream.

Specified by:
sendEvent in class BaseXMLEventWriter
Parameters:
event - The event to write.
Throws:
XMLStreamException - If an error occurs processing the event.