public class XmlRetainingSink extends Object implements XMLEventWriter
Modifier and Type | Field and Description |
---|---|
private List<XMLEvent> |
retainedElements |
private XMLEventWriter |
xmlWriter |
Constructor and Description |
---|
XmlRetainingSink(XMLEventWriter xmlWriter) |
Modifier and Type | Method and Description |
---|---|
void |
add(XMLEvent event) |
void |
add(XMLEventReader reader) |
void |
addDespiteRetainment(XMLEvent event) |
void |
close() |
void |
flush() |
NamespaceContext |
getNamespaceContext() |
String |
getPrefix(String uri) |
List<XMLEvent> |
getRetainedElements() |
boolean |
isRetaining() |
XMLEventWriter |
parent() |
void |
setDefaultNamespace(String uri) |
void |
setNamespaceContext(NamespaceContext context) |
void |
setPrefix(String prefix,
String uri) |
void |
startRetaining() |
void |
stopRetaining(boolean flush) |
String |
toString() |
private final XMLEventWriter xmlWriter
public XmlRetainingSink(XMLEventWriter xmlWriter)
public void add(XMLEvent event) throws XMLStreamException
add
in interface XMLEventConsumer
add
in interface XMLEventWriter
XMLStreamException
public void startRetaining() throws XMLStreamException
XMLStreamException
public void addDespiteRetainment(XMLEvent event) throws XMLStreamException
XMLStreamException
public void stopRetaining(boolean flush) throws XMLStreamException
XMLStreamException
public boolean isRetaining()
public XMLEventWriter parent()
public void flush() throws XMLStreamException
flush
in interface XMLEventWriter
XMLStreamException
public void add(XMLEventReader reader) throws XMLStreamException
add
in interface XMLEventWriter
XMLStreamException
public String getPrefix(String uri) throws XMLStreamException
getPrefix
in interface XMLEventWriter
XMLStreamException
public void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix
in interface XMLEventWriter
XMLStreamException
public void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace
in interface XMLEventWriter
XMLStreamException
public void setNamespaceContext(NamespaceContext context) throws XMLStreamException
setNamespaceContext
in interface XMLEventWriter
XMLStreamException
public NamespaceContext getNamespaceContext()
getNamespaceContext
in interface XMLEventWriter
public void close() throws XMLStreamException
close
in interface XMLEventWriter
XMLStreamException
Copyright © 2022 Requirement Yogi. All rights reserved.