Package org.dellroad.stuff.xml
Class EventWriterDelegate
java.lang.Object
org.dellroad.stuff.xml.EventWriterDelegate
- All Implemented Interfaces:
XMLEventConsumer
,XMLEventWriter
- Direct Known Subclasses:
AnnotatedXMLEventWriter
,IndentXMLEventWriter
Support superclass for filtering
XMLEventWriter
implementations.
All methods delegate to the configured parent.-
Constructor Summary
ConstructorDescriptionDefault constructor.EventWriterDelegate
(XMLEventWriter parent) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
add
(XMLEventReader reader) void
close()
void
flush()
Get parent instance.void
void
setNamespaceContext
(NamespaceContext context) void
setParent
(XMLEventWriter parent) Set parent instance.void
-
Constructor Details
-
EventWriterDelegate
public EventWriterDelegate()Default constructor. The parent must be configured viasetParent(javax.xml.stream.XMLEventWriter)
. -
EventWriterDelegate
Constructor.- Parameters:
parent
- underlying writer wrapped by this instance
-
-
Method Details
-
getParent
Get parent instance.- Returns:
- parent of this instance
-
setParent
Set parent instance.- Parameters:
parent
- parent of this instance
-
add
- Specified by:
add
in interfaceXMLEventConsumer
- Specified by:
add
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
flush
- Specified by:
flush
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
close
- Specified by:
close
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
add
- Specified by:
add
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
getPrefix
- Specified by:
getPrefix
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
setPrefix
- Specified by:
setPrefix
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
setDefaultNamespace
- Specified by:
setDefaultNamespace
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
setNamespaceContext
- Specified by:
setNamespaceContext
in interfaceXMLEventWriter
- Throws:
XMLStreamException
-
getNamespaceContext
- Specified by:
getNamespaceContext
in interfaceXMLEventWriter
-