public class Stax2EventWriterImpl extends Object implements XMLEventWriter, XMLStreamConstants
XMLEventWriter.ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT| Constructor and Description |
|---|
Stax2EventWriterImpl(XMLStreamWriter2 sw) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(XMLEvent event)
Basic implementation of the method which will use event implementations
available as part of the reference implementation.
|
void |
add(XMLEventReader reader) |
void |
close() |
void |
flush() |
NamespaceContext |
getNamespaceContext() |
String |
getPrefix(String uri) |
void |
setDefaultNamespace(String uri) |
void |
setNamespaceContext(NamespaceContext ctxt) |
void |
setPrefix(String prefix,
String uri) |
public Stax2EventWriterImpl(XMLStreamWriter2 sw)
public void add(XMLEvent event) throws XMLStreamException
Note: ALL events (except for custom ones ref. impl. itself doesn't produce, and thus may not always be able to deal with) are routed through stream writer. This because it may want to do different kinds of validation
add in interface XMLEventConsumeradd in interface XMLEventWriterXMLStreamExceptionpublic void add(XMLEventReader reader) throws XMLStreamException
add in interface XMLEventWriterXMLStreamExceptionpublic void close()
throws XMLStreamException
close in interface XMLEventWriterXMLStreamExceptionpublic void flush()
throws XMLStreamException
flush in interface XMLEventWriterXMLStreamExceptionpublic NamespaceContext getNamespaceContext()
getNamespaceContext in interface XMLEventWriterpublic String getPrefix(String uri) throws XMLStreamException
getPrefix in interface XMLEventWriterXMLStreamExceptionpublic void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace in interface XMLEventWriterXMLStreamExceptionpublic void setNamespaceContext(NamespaceContext ctxt) throws XMLStreamException
setNamespaceContext in interface XMLEventWriterXMLStreamExceptionpublic void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix in interface XMLEventWriterXMLStreamExceptionCopyright © 2015 fasterxml.com. All Rights Reserved.