Package com.ibm.fhir.model.util
Class XMLSupport.StreamWriterDelegate
- java.lang.Object
-
- com.ibm.fhir.model.util.XMLSupport.StreamWriterDelegate
-
- All Implemented Interfaces:
AutoCloseable
,XMLStreamWriter
- Enclosing class:
- XMLSupport
public static class XMLSupport.StreamWriterDelegate extends Object implements XMLStreamWriter, AutoCloseable
The corollary toStreamReaderDelegate
. This class is designed to sit between an XMLStreamWriter and an application's XMLStreamWriter. By default each method does nothing but call the corresponding method on the parent interface.
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLStreamWriter
writer
-
Constructor Summary
Constructors Constructor Description StreamWriterDelegate(XMLStreamWriter writer)
-
Method Summary
-
-
-
Field Detail
-
writer
protected final XMLStreamWriter writer
-
-
Constructor Detail
-
StreamWriterDelegate
public StreamWriterDelegate(XMLStreamWriter writer)
-
-
Method Detail
-
getWriter
public XMLStreamWriter getWriter()
- Returns:
- the underlying writer being delegated to
-
close
public void close() throws XMLStreamException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
flush
public void flush() throws XMLStreamException
- Specified by:
flush
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
getNamespaceContext
public NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContext
in interfaceXMLStreamWriter
-
getPrefix
public String getPrefix(String uri) throws XMLStreamException
- Specified by:
getPrefix
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
getProperty
public Object getProperty(String name) throws IllegalArgumentException
- Specified by:
getProperty
in interfaceXMLStreamWriter
- Throws:
IllegalArgumentException
-
setDefaultNamespace
public void setDefaultNamespace(String uri) throws XMLStreamException
- Specified by:
setDefaultNamespace
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
setNamespaceContext
public void setNamespaceContext(NamespaceContext context) throws XMLStreamException
- Specified by:
setNamespaceContext
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
setPrefix
public void setPrefix(String prefix, String uri) throws XMLStreamException
- Specified by:
setPrefix
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String localName, String value) throws XMLStreamException
- Specified by:
writeAttribute
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException
- Specified by:
writeAttribute
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException
- Specified by:
writeAttribute
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeCData
public void writeCData(String data) throws XMLStreamException
- Specified by:
writeCData
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeCharacters
public void writeCharacters(char[] text, int start, int len) throws XMLStreamException
- Specified by:
writeCharacters
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeCharacters
public void writeCharacters(String text) throws XMLStreamException
- Specified by:
writeCharacters
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeComment
public void writeComment(String data) throws XMLStreamException
- Specified by:
writeComment
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeDefaultNamespace
public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException
- Specified by:
writeDefaultNamespace
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeDTD
public void writeDTD(String dtd) throws XMLStreamException
- Specified by:
writeDTD
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEmptyElement
public void writeEmptyElement(String localName) throws XMLStreamException
- Specified by:
writeEmptyElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEmptyElement
public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException
- Specified by:
writeEmptyElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEmptyElement
public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
- Specified by:
writeEmptyElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEndDocument
public void writeEndDocument() throws XMLStreamException
- Specified by:
writeEndDocument
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEndElement
public void writeEndElement() throws XMLStreamException
- Specified by:
writeEndElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEntityRef
public void writeEntityRef(String name) throws XMLStreamException
- Specified by:
writeEntityRef
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeNamespace
public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException
- Specified by:
writeNamespace
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeProcessingInstruction
public void writeProcessingInstruction(String target) throws XMLStreamException
- Specified by:
writeProcessingInstruction
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeProcessingInstruction
public void writeProcessingInstruction(String target, String data) throws XMLStreamException
- Specified by:
writeProcessingInstruction
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartDocument
public void writeStartDocument() throws XMLStreamException
- Specified by:
writeStartDocument
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartDocument
public void writeStartDocument(String version) throws XMLStreamException
- Specified by:
writeStartDocument
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartDocument
public void writeStartDocument(String encoding, String version) throws XMLStreamException
- Specified by:
writeStartDocument
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String localName) throws XMLStreamException
- Specified by:
writeStartElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException
- Specified by:
writeStartElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
- Specified by:
writeStartElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
-