XmlOutput
ForkXmlOutput
, MTOMXmlOutput
, SAXOutput
, UTF8XmlOutput
, XMLEventWriterOutput
, XMLStreamWriterOutput
public abstract class XmlOutputAbstractImpl extends java.lang.Object implements XmlOutput
XmlOutput
Implements the optimal methods, where defer to
the non-optimal methods.Modifier and Type | Field | 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 | Description |
---|---|
XmlOutputAbstractImpl() |
Modifier and Type | Method | Description |
---|---|---|
abstract void |
attribute(int prefix,
java.lang.String localName,
java.lang.String value) |
|
void |
attribute(Name name,
java.lang.String value) |
|
abstract void |
beginStartTag(int prefix,
java.lang.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,
java.lang.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 java.io.IOException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException
startDocument
in interface XmlOutput
serializer
- the XMLSerializer
that coordinates this whole marshalling episode.fragment
- true if we are marshalling a fragment.java.io.IOException
org.xml.sax.SAXException
javax.xml.stream.XMLStreamException
public void endDocument(boolean fragment) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException
endDocument
in interface XmlOutput
fragment
- false if we are writing the whole document.java.io.IOException
org.xml.sax.SAXException
javax.xml.stream.XMLStreamException
public void beginStartTag(Name name) throws java.io.IOException, javax.xml.stream.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 XmlOutput
java.io.IOException
javax.xml.stream.XMLStreamException
public abstract void beginStartTag(int prefix, java.lang.String localName) throws java.io.IOException, javax.xml.stream.XMLStreamException
beginStartTag
in interface XmlOutput
java.io.IOException
javax.xml.stream.XMLStreamException
public void attribute(Name name, java.lang.String value) throws java.io.IOException, javax.xml.stream.XMLStreamException
public abstract void attribute(int prefix, java.lang.String localName, java.lang.String value) throws java.io.IOException, javax.xml.stream.XMLStreamException
public abstract void endStartTag() throws java.io.IOException, org.xml.sax.SAXException
endStartTag
in interface XmlOutput
java.io.IOException
org.xml.sax.SAXException
public void endTag(Name name) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException
Copyright © 2018 Oracle Corporation. All rights reserved.