|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.output.XmlOutputAbstractImpl
public abstract class XmlOutputAbstractImpl
Abstract implementation of XmlOutput
Implements the optimal methods, where defer to
the non-optimal methods.
Field Summary | |
---|---|
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 Summary | |
---|---|
XmlOutputAbstractImpl()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sun.xml.bind.v2.runtime.output.XmlOutput |
---|
text, text |
Field Detail |
---|
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
Constructor Detail |
---|
public XmlOutputAbstractImpl()
Method Detail |
---|
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
attribute
in interface XmlOutput
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
attribute
in interface XmlOutput
prefix
- -1 if this attribute does not have a prefix
(this handling differs from that of elements.)
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
endTag
in interface XmlOutput
java.io.IOException
org.xml.sax.SAXException
javax.xml.stream.XMLStreamException
public abstract void endTag(int prefix, java.lang.String localName) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException
endTag
in interface XmlOutput
java.io.IOException
org.xml.sax.SAXException
javax.xml.stream.XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |