com.sun.xml.bind.v2.runtime.output
public class UTF8XmlOutput extends XmlOutputAbstractImpl
Field Summary | |
---|---|
protected boolean | closeStartTagPending
Set to true to indicate that we need to write '>'
to close a start tag. |
protected byte[] | octetBuffer Buffer of octets for writing. |
protected int | octetBufferIndex Index in buffer to write to. |
protected OutputStream | out |
Constructor Summary | |
---|---|
UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler) |
Method Summary | |
---|---|
void | attribute(Name name, String value) |
void | attribute(int prefix, String localName, String value) |
void | beginStartTag(int prefix, String localName) |
void | beginStartTag(Name name) |
protected void | closeStartTag()
Writes '>' to close the start tag, if necessary. |
void | endDocument(boolean fragment) |
void | endStartTag() |
void | endTag(Name name) |
void | endTag(int prefix, String localName) |
protected void | flushBuffer() |
void | setHeader(String header) |
void | startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) |
void | text(String value, boolean needSP) |
void | text(Pcdata value, boolean needSP) |
void | text(int value) |
void | text(byte[] data, int dataLen)
Writes the given byte[] as base64 encoded binary to the output.
|
static byte[] | toBytes(String s) |
void | write(int i)
Writes one byte directly into the buffer.
|
protected void | write(byte[] b) |
protected void | write(byte[] b, int start, int length) |
protected void | writeNsDecl(int prefixIndex)
Writes a single namespace declaration for the specified prefix. |
protected void | writeNsDecls(int base) |
Parameters: localNames local names encoded in UTF-8.
Being defined on this class allows this method to access the buffer directly, which translates to a better performance.
This method can be used somewhat like the {@code text} method, but it doesn't perform character escaping.