com.sun.xml.bind.v2.runtime.output

Class XMLStreamWriterOutput

public class XMLStreamWriterOutput extends XmlOutputAbstractImpl

XmlOutput that writes to StAX XMLStreamWriter.

TODO: Finding the optimized FI implementations is a bit hacky and not very extensible. Can we use the service provider mechanism in general for concrete implementations of XmlOutputAbstractImpl.

Field Summary
protected char[]buf
Constructor Summary
protected XMLStreamWriterOutput(XMLStreamWriter out)
Method Summary
voidattribute(int prefix, String localName, String value)
voidbeginStartTag(int prefix, String localName)
static XmlOutputcreate(XMLStreamWriter out, JAXBContextImpl context)
Creates a new XmlOutput from a XMLStreamWriter.
voidendDocument(boolean fragment)
voidendStartTag()
voidendTag(int prefix, String localName)
voidstartDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext)
voidtext(String value, boolean needsSeparatingWhitespace)
voidtext(Pcdata value, boolean needsSeparatingWhitespace)

Field Detail

buf

protected final char[] buf

Constructor Detail

XMLStreamWriterOutput

protected XMLStreamWriterOutput(XMLStreamWriter out)

Method Detail

attribute

public void attribute(int prefix, String localName, String value)

beginStartTag

public void beginStartTag(int prefix, String localName)

create

public static XmlOutput create(XMLStreamWriter out, JAXBContextImpl context)
Creates a new XmlOutput from a XMLStreamWriter. This method recognizes an FI StAX writer.

endDocument

void endDocument(boolean fragment)

endStartTag

public void endStartTag()

endTag

public void endTag(int prefix, String localName)

startDocument

void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext)

text

public void text(String value, boolean needsSeparatingWhitespace)

text

public void text(Pcdata value, boolean needsSeparatingWhitespace)