XmlOutput implementation specialized for UTF-8.
| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | |
| private static final byte[] | |
| private static final byte[] | |
| private static final byte[] | |
| private static final byte[] | |
| private static final byte[] | |
| private final byte[] | |
| protected boolean | closeStartTagPending
Set to true to indicate that we need to write |
| private static final byte[] | |
| private final byte[] | |
| private final byte[] | |
| private CharacterEscapeHandler | |
| private String | |
| private final Encoded[] | localNames
local names encoded in UTF-8. |
| protected final byte[] | octetBuffer
Buffer of octets for writing. |
| protected int | octetBufferIndex
Index in buffer to write to. |
| protected final OutputStream | |
| private int | prefixCount
Of the |
| private Encoded[] | prefixes
prefixes encoded. |
| private final Encoded | textBuffer
Temporary buffer used to encode text. |
| private final byte[] | |
| private final byte[] | |
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| public | UTF8XmlOutput(OutputStream out, Encoded[]
local names encoded in UTF-8. localNames, CharacterEscapeHandler escapeHandler)
|
| _CLOSE_TAG | back to summary |
|---|---|
| private static final byte[] _CLOSE_TAG | |
| _EMPTY_TAG | back to summary |
|---|---|
| private static final byte[] _EMPTY_TAG | |
| _EQUALS | back to summary |
|---|---|
| private static final byte[] _EQUALS | |
| _XML_DECL | back to summary |
|---|---|
| private static final byte[] _XML_DECL | |
| _XMLNS_COLON | back to summary |
|---|---|
| private static final byte[] _XMLNS_COLON | |
| _XMLNS_EQUALS | back to summary |
|---|---|
| private static final byte[] _XMLNS_EQUALS | |
| CLOSE_TAG | back to summary |
|---|---|
| private final byte[] CLOSE_TAG | |
| closeStartTagPending | back to summary |
|---|---|
| protected boolean closeStartTagPending Set to true to indicate that we need to write | |
| EMPTY_BYTE_ARRAY | back to summary |
|---|---|
| private static final byte[] EMPTY_BYTE_ARRAY | |
| EMPTY_TAG | back to summary |
|---|---|
| private final byte[] EMPTY_TAG | |
| EQUALS | back to summary |
|---|---|
| private final byte[] EQUALS | |
| escapeHandler | back to summary |
|---|---|
| private CharacterEscapeHandler escapeHandler | |
| header | back to summary |
|---|---|
private String header
| |
| localNames | back to summary |
|---|---|
| private final Encoded[] localNames local names encoded in UTF-8. All entries are pre-filled. | |
| octetBuffer | back to summary |
|---|---|
| protected final byte[] octetBuffer Buffer of octets for writing. | |
| octetBufferIndex | back to summary |
|---|---|
| protected int octetBufferIndex Index in buffer to write to. | |
| out | back to summary |
|---|---|
| protected final OutputStream out | |
| prefixCount | back to summary |
|---|---|
| private int prefixCount Of the | |
| prefixes | back to summary |
|---|---|
| private Encoded[] prefixes prefixes encoded. | |
| textBuffer | back to summary |
|---|---|
| private final Encoded textBuffer Temporary buffer used to encode text. | |
| XML_DECL | back to summary |
|---|---|
| private final byte[] XML_DECL | |
| XMLNS_COLON | back to summary |
|---|---|
| private final byte[] XMLNS_COLON | |
| XMLNS_EQUALS | back to summary |
|---|---|
| private final byte[] XMLNS_EQUALS | |
| UTF8XmlOutput | back to summary |
|---|---|
public UTF8XmlOutput(OutputStream out, Encoded[] localNames, CharacterEscapeHandler escapeHandler)
| |
| attribute | back to summary |
|---|---|
| public void attribute(Name name, String value) throws IOException Overrides org. Implements org.
| |
| attribute | back to summary |
|---|---|
| public void attribute(int prefix, String localName, String value) throws IOException Implements abstract org. Implements org.
| |
| beginStartTag | back to summary |
|---|---|
| public void beginStartTag(int prefix, String localName) throws IOException Implements abstract org. Implements org.
| |
| beginStartTag | back to summary |
|---|---|
| public void beginStartTag(Name name) throws IOException Overrides org. Implements org. Doc from org. Writes a start tag.
At this point This method is used for writing tags that are indexed.
| |
| closeStartTag | back to summary |
|---|---|
| protected final void closeStartTag() throws IOException Writes | |
| doText | back to summary |
|---|---|
| private void doText(String value, boolean isAttribute) throws IOException | |
| endDocument | back to summary |
|---|---|
| public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException Overrides org. Implements org. Doc from org. Called at the very end.
| |
| endStartTag | back to summary |
|---|---|
| public void endStartTag() throws IOException Implements abstract org. Implements org.
| |
| endTag | back to summary |
|---|---|
| public void endTag(Name name) throws IOException Overrides org. Implements org.
| |
| endTag | back to summary |
|---|---|
| public void endTag(int prefix, String localName) throws IOException Implements abstract org. Implements org.
| |
| flushBuffer | back to summary |
|---|---|
| protected final void flushBuffer() throws IOException | |
| pushNsDecls | back to summary |
|---|---|
| private int pushNsDecls() | |
| setHeader | back to summary |
|---|---|
| public void setHeader(String header) | |
| startDocument | back to summary |
|---|---|
| public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException Overrides org. Implements org. Doc from org. Called at the very beginning.
| |
| text | back to summary |
|---|---|
| public void text(String value, boolean needSP) throws IOException Implements org. Doc from org. Writes XML text with character escaping, if necessary.
| |
| text | back to summary |
|---|---|
| public void text(Pcdata value, boolean needSP) throws IOException Implements org. Doc from org. Writes XML text with character escaping, if necessary.
| |
| text | back to summary |
|---|---|
| public final void text(int value) throws IOException | |
| text | back to summary |
|---|---|
| public void text(byte[] data, int dataLen) throws IOException Writes the given byte[] as base64 encoded binary to the output. Being defined on this class allows this method to access the buffer directly, which translates to a better performance.
| |
| toBytes | back to summary |
|---|---|
| pack-priv static byte[] toBytes(String s) | |
| write | back to summary |
|---|---|
| public final void write(int i) throws IOException Writes one byte directly into the buffer.
This method can be used somewhat like the | |
| write | back to summary |
|---|---|
| protected final void write(byte[] b) throws IOException | |
| write | back to summary |
|---|---|
| protected final void write(byte[] b, int start, int length) throws IOException | |
| writeName | back to summary |
|---|---|
| private void writeName(Name name) throws IOException | |
| writeName | back to summary |
|---|---|
| private void writeName(int prefix, String localName) throws IOException | |
| writeNsDecl | back to summary |
|---|---|
| protected final void writeNsDecl(int prefixIndex) throws IOException Writes a single namespace declaration for the specified prefix. | |
| writeNsDecls | back to summary |
|---|---|
| protected void writeNsDecls(int base) throws IOException | |
| writePrefix | back to summary |
|---|---|
| private void writePrefix(int prefix) throws IOException | |