public abstract class XmlOutputAbstractImpl extends Object implements XmlOutput
XmlOutput
Implements the optimal methods, where defer to
the non-optimal methods.| Modifier and Type | Field and Description |
|---|---|
protected NamespaceContextImpl |
nsContext
Set by the marshaller before the start tag is written for the root element.
|
protected int[] |
nsUriIndex2prefixIndex
The conversion table from the namespace URI index to prefix index.
|
protected XMLSerializer |
serializer |
| Constructor and Description |
|---|
XmlOutputAbstractImpl() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
attribute(int prefix,
String localName,
String value) |
void |
attribute(Name name,
String value) |
abstract void |
beginStartTag(int prefix,
String localName) |
void |
beginStartTag(Name name)
Writes a start tag.
|
void |
endDocument(boolean fragment)
Called at the very end.
|
abstract void |
endStartTag() |
abstract void |
endTag(int prefix,
String localName) |
void |
endTag(Name name) |
void |
startDocument(XMLSerializer serializer,
boolean fragment,
int[] nsUriIndex2prefixIndex,
NamespaceContextImpl nsContext)
Called at the very beginning.
|
protected int[] nsUriIndex2prefixIndex
XMLSerializer and
is updated by it automatically.
This allows Name.nsUriIndex to be converted to prefix index
(for NamespaceContextImpl) quickly.protected NamespaceContextImpl nsContext
protected XMLSerializer serializer
public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException
startDocument in interface XmlOutputserializer - the XMLSerializer that coordinates this whole marshalling episode.fragment - true if we are marshalling a fragment.IOExceptionSAXExceptionXMLStreamExceptionpublic void endDocument(boolean fragment)
throws IOException,
SAXException,
XMLStreamException
endDocument in interface XmlOutputfragment - false if we are writing the whole document.IOExceptionSAXExceptionXMLStreamExceptionpublic void beginStartTag(Name name) throws IOException, XMLStreamException
At this point nsContext holds namespace declarations needed for this
new element.
This method is used for writing tags that are indexed.
beginStartTag in interface XmlOutputIOExceptionXMLStreamExceptionpublic abstract void beginStartTag(int prefix,
String localName)
throws IOException,
XMLStreamException
beginStartTag in interface XmlOutputIOExceptionXMLStreamExceptionpublic void attribute(Name name, String value) throws IOException, XMLStreamException
attribute in interface XmlOutputIOExceptionXMLStreamExceptionpublic abstract void attribute(int prefix,
String localName,
String value)
throws IOException,
XMLStreamException
attribute in interface XmlOutputprefix - -1 if this attribute does not have a prefix
(this handling differs from that of elements.)IOExceptionXMLStreamExceptionpublic abstract void endStartTag()
throws IOException,
SAXException
endStartTag in interface XmlOutputIOExceptionSAXExceptionpublic void endTag(Name name) throws IOException, SAXException, XMLStreamException
endTag in interface XmlOutputIOExceptionSAXExceptionXMLStreamExceptionpublic abstract void endTag(int prefix,
String localName)
throws IOException,
SAXException,
XMLStreamException
endTag in interface XmlOutputIOExceptionSAXExceptionXMLStreamExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.