Package javanet.staxutils
Class XMLStreamEventWriter
- java.lang.Object
-
- javanet.staxutils.BaseXMLEventWriter
-
- javanet.staxutils.XMLStreamEventWriter
-
- All Implemented Interfaces:
XMLEventConsumer,XMLEventWriter
public class XMLStreamEventWriter extends BaseXMLEventWriter
XMLEventWriterthat writes events to aXMLStreamWriter.- Version:
- $Revision: 1.1 $
- Author:
- Christian Niles
-
-
Constructor Summary
Constructors Constructor Description XMLStreamEventWriter(XMLStreamWriter writer)Constructs aXMLEventStreamWriterthat writes events to the given stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()protected voidsendEvent(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
-
-
-
-
Constructor Detail
-
XMLStreamEventWriter
public XMLStreamEventWriter(XMLStreamWriter writer)
Constructs aXMLEventStreamWriterthat writes events to the given stream.- Parameters:
writer- TheXMLStreamWriterto which the events will be written.
-
-
Method Detail
-
flush
public void flush() throws XMLStreamException- Specified by:
flushin interfaceXMLEventWriter- Overrides:
flushin classBaseXMLEventWriter- Throws:
XMLStreamException
-
close
public void close() throws XMLStreamException- Specified by:
closein interfaceXMLEventWriter- Overrides:
closein classBaseXMLEventWriter- Throws:
XMLStreamException
-
sendEvent
protected void sendEvent(XMLEvent event) throws XMLStreamException
Description copied from class:BaseXMLEventWriterCalled by the methods of this class to write the event to the stream.- Specified by:
sendEventin classBaseXMLEventWriter- Parameters:
event- The event to write.- Throws:
XMLStreamException- If an error occurs processing the event.
-
-