public class XMLStreamEventWriter extends BaseXMLEventWriter
XMLEventWriter
that writes events to a
XMLStreamWriter
.Constructor and Description |
---|
XMLStreamEventWriter(XMLStreamWriter writer)
Constructs a
XMLEventStreamWriter that writes events to the
given stream. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
protected void |
sendEvent(XMLEvent event)
Called by the methods of this class to write the event to the stream.
|
add, add, cacheAttribute, cacheNamespace, getNamespaceContext, getPrefix, peekNamespaceStack, popNamespaceStack, pushNamespaceStack, setDefaultNamespace, setNamespaceContext, setPrefix
public XMLStreamEventWriter(XMLStreamWriter writer)
XMLEventStreamWriter
that writes events to the
given stream.writer
- The XMLStreamWriter
to which the events will be
written.public void flush() throws XMLStreamException
flush
in interface XMLEventWriter
flush
in class BaseXMLEventWriter
XMLStreamException
public void close() throws XMLStreamException
close
in interface XMLEventWriter
close
in class BaseXMLEventWriter
XMLStreamException
protected void sendEvent(XMLEvent event) throws XMLStreamException
BaseXMLEventWriter
sendEvent
in class BaseXMLEventWriter
event
- The event to write.XMLStreamException
- If an error occurs processing the event.