Package org.codehaus.stax2.util
Class StreamWriterDelegate
- java.lang.Object
-
- org.codehaus.stax2.util.StreamWriterDelegate
-
- All Implemented Interfaces:
XMLStreamWriter
- Direct Known Subclasses:
Stax2WriterAdapter
,StreamWriter2Delegate
public class StreamWriterDelegate extends Object implements XMLStreamWriter
Similar toStreamReaderDelegate
, but implements a proxy forXMLStreamWriter
. The only additional methods are ones for setting and accessing the delegate to forward requests to.Note: such class really should exist in core Stax API (in package
javax.xml.stream.util
), but since it does not, it is implemented within Stax2 extension API- Since:
- 3.0
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLStreamWriter
mDelegate
-
Constructor Summary
Constructors Constructor Description StreamWriterDelegate(XMLStreamWriter parentWriter)
-
Method Summary
-
-
-
Field Detail
-
mDelegate
protected XMLStreamWriter mDelegate
-
-
Constructor Detail
-
StreamWriterDelegate
public StreamWriterDelegate(XMLStreamWriter parentWriter)
-
-
Method Detail
-
setParent
public void setParent(XMLStreamWriter parentWriter)
-
getParent
public XMLStreamWriter getParent()
-
close
public void close() throws XMLStreamException
- 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 ns) throws XMLStreamException
- Specified by:
getPrefix
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
getProperty
public Object getProperty(String pname) throws IllegalArgumentException
- Specified by:
getProperty
in interfaceXMLStreamWriter
- Throws:
IllegalArgumentException
-
setDefaultNamespace
public void setDefaultNamespace(String ns) throws XMLStreamException
- Specified by:
setDefaultNamespace
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
setNamespaceContext
public void setNamespaceContext(NamespaceContext nc) 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 arg0, String arg1) throws XMLStreamException
- Specified by:
writeAttribute
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String arg0, String arg1, String arg2) throws XMLStreamException
- Specified by:
writeAttribute
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String arg0, String arg1, String arg2, String arg3) throws XMLStreamException
- Specified by:
writeAttribute
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeCData
public void writeCData(String arg0) throws XMLStreamException
- Specified by:
writeCData
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeCharacters
public void writeCharacters(String arg0) throws XMLStreamException
- Specified by:
writeCharacters
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeCharacters
public void writeCharacters(char[] arg0, int arg1, int arg2) throws XMLStreamException
- Specified by:
writeCharacters
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeComment
public void writeComment(String arg0) throws XMLStreamException
- Specified by:
writeComment
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeDTD
public void writeDTD(String arg0) throws XMLStreamException
- Specified by:
writeDTD
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeDefaultNamespace
public void writeDefaultNamespace(String arg0) throws XMLStreamException
- Specified by:
writeDefaultNamespace
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEmptyElement
public void writeEmptyElement(String arg0) throws XMLStreamException
- Specified by:
writeEmptyElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEmptyElement
public void writeEmptyElement(String arg0, String arg1) throws XMLStreamException
- Specified by:
writeEmptyElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeEmptyElement
public void writeEmptyElement(String arg0, String arg1, String arg2) 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 arg0) throws XMLStreamException
- Specified by:
writeEntityRef
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeNamespace
public void writeNamespace(String arg0, String arg1) throws XMLStreamException
- Specified by:
writeNamespace
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeProcessingInstruction
public void writeProcessingInstruction(String arg0) throws XMLStreamException
- Specified by:
writeProcessingInstruction
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeProcessingInstruction
public void writeProcessingInstruction(String arg0, String arg1) 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 arg0) throws XMLStreamException
- Specified by:
writeStartDocument
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartDocument
public void writeStartDocument(String arg0, String arg1) throws XMLStreamException
- Specified by:
writeStartDocument
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String arg0) throws XMLStreamException
- Specified by:
writeStartElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String arg0, String arg1) throws XMLStreamException
- Specified by:
writeStartElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String arg0, String arg1, String arg2) throws XMLStreamException
- Specified by:
writeStartElement
in interfaceXMLStreamWriter
- Throws:
XMLStreamException
-
-