public class XMLStreamEventWriter extends BaseXMLEventWriter
XMLEventWriter
that writes events to a
XMLStreamWriter
.Constructor and Description |
---|
XMLStreamEventWriter(javax.xml.stream.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(javax.xml.stream.events.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(javax.xml.stream.XMLStreamWriter writer)
XMLEventStreamWriter
that writes events to the
given stream.writer
- The XMLStreamWriter
to which the events will be
written.public void flush() throws javax.xml.stream.XMLStreamException
flush
in interface javax.xml.stream.XMLEventWriter
flush
in class BaseXMLEventWriter
javax.xml.stream.XMLStreamException
public void close() throws javax.xml.stream.XMLStreamException
close
in interface javax.xml.stream.XMLEventWriter
close
in class BaseXMLEventWriter
javax.xml.stream.XMLStreamException
protected void sendEvent(javax.xml.stream.events.XMLEvent event) throws javax.xml.stream.XMLStreamException
BaseXMLEventWriter
sendEvent
in class BaseXMLEventWriter
event
- The event to write.javax.xml.stream.XMLStreamException
- If an error occurs processing the event.