public class ExportWriter extends Object implements XMLStreamWriter
XMLStreamWriter that
will disallow the users from doing illegal things during export (like closing the writer)
but at the same time implements the full XMLStreamWriter interface so that
it can be more interoperable with other tooling.| Constructor and Description |
|---|
ExportWriter(XMLStreamWriter wrapped) |
public ExportWriter(XMLStreamWriter wrapped)
public void writeStartElement(String localName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(String namespaceURI, String localName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String localName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEndElement()
throws XMLStreamException,
IllegalExporterActionException
writeEndElement in interface XMLStreamWriterIllegalExporterActionException - if the writer would end an element
not previously defined by this writer (i.e. if it would end an element that this
writer wrote to and thus would escape out of the exporter's "shell").XMLStreamExceptionXMLStreamWriter.writeEndElement()public void writeEndDocument()
throws XMLStreamException
writeEndDocument in interface XMLStreamWriterIllegalExporterActionException - exporters aren't allowed to do this.XMLStreamExceptionpublic void close()
throws XMLStreamException
close in interface XMLStreamWriterXMLStreamExceptionpublic void flush()
throws XMLStreamException
flush in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException
writeNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeDefaultNamespace(String namespaceURI) throws XMLStreamException
writeDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeComment(String data) throws XMLStreamException
writeComment in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(String target) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(String target, String data) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeCData(String data) throws XMLStreamException
writeCData in interface XMLStreamWriterXMLStreamExceptionpublic void writeDTD(String dtd) throws XMLStreamException
writeDTD in interface XMLStreamWriterXMLStreamExceptionpublic void writeEntityRef(String name) throws XMLStreamException
writeEntityRef in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument()
throws XMLStreamException
writeStartDocument in interface XMLStreamWriterIllegalExporterActionExceptionXMLStreamExceptionpublic void writeStartDocument(String version) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterIllegalExporterActionExceptionXMLStreamExceptionpublic void writeStartDocument(String encoding, String version) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterIllegalExporterActionExceptionXMLStreamExceptionpublic void writeCharacters(String text) throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(char[] text,
int start,
int len)
throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic String getPrefix(String uri) throws XMLStreamException
getPrefix in interface XMLStreamWriterXMLStreamExceptionpublic void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix in interface XMLStreamWriterXMLStreamExceptionpublic void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void setNamespaceContext(NamespaceContext context) throws XMLStreamException
setNamespaceContext in interface XMLStreamWriterIllegalExporterActionExceptionXMLStreamExceptionpublic NamespaceContext getNamespaceContext()
getNamespaceContext in interface XMLStreamWriterpublic Object getProperty(String name) throws IllegalArgumentException
getProperty in interface XMLStreamWriterIllegalArgumentExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.