javanet.staxutils.helpers
Class EventWriterDelegate
java.lang.Object
javanet.staxutils.helpers.EventWriterDelegate
- All Implemented Interfaces:
- XMLEventConsumer, XMLEventWriter
- Direct Known Subclasses:
- IndentingXMLEventWriter
public abstract class EventWriterDelegate
- extends Object
- implements XMLEventWriter
Abstract class for implementing XML filters. This class provides methods that
merely delegate to a contained XMLEventWriter. Subclasses should override
some of these methods, and may also provide additional methods and fields.
- Author:
- John Kristian
|
Field Summary |
protected XMLEventWriter |
out
The downstream writer, to which events are delegated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
protected final XMLEventWriter out
- The downstream writer, to which events are delegated.
EventWriterDelegate
protected EventWriterDelegate(XMLEventWriter out)
setNamespaceContext
public void setNamespaceContext(NamespaceContext context)
throws XMLStreamException
- Specified by:
setNamespaceContext in interface XMLEventWriter
- Throws:
XMLStreamException
getNamespaceContext
public NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContext in interface XMLEventWriter
setDefaultNamespace
public void setDefaultNamespace(String uri)
throws XMLStreamException
- Specified by:
setDefaultNamespace in interface XMLEventWriter
- Throws:
XMLStreamException
setPrefix
public void setPrefix(String prefix,
String uri)
throws XMLStreamException
- Specified by:
setPrefix in interface XMLEventWriter
- Throws:
XMLStreamException
getPrefix
public String getPrefix(String uri)
throws XMLStreamException
- Specified by:
getPrefix in interface XMLEventWriter
- Throws:
XMLStreamException
add
public void add(XMLEvent event)
throws XMLStreamException
- Specified by:
add in interface XMLEventConsumer- Specified by:
add in interface XMLEventWriter
- Throws:
XMLStreamException
add
public void add(XMLEventReader reader)
throws XMLStreamException
- Add events from the given reader, one by one.
- Specified by:
add in interface XMLEventWriter
- Throws:
XMLStreamException
flush
public void flush()
throws XMLStreamException
- Specified by:
flush in interface XMLEventWriter
- Throws:
XMLStreamException
close
public void close()
throws XMLStreamException
- Specified by:
close in interface XMLEventWriter
- Throws:
XMLStreamException
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.