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.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final char[] | |
| private final CharacterEscapeHandler | |
| private static final Constructor | |
| private static final Class | FI_STAX_WRITER_CLASS
Reference to FI's XMLStreamWriter class, if FI can be loaded. |
| private final XMLStreamWriter | |
| private static final Constructor | |
| private static final Class | |
| private final XMLStreamWriterOutput. |
| Access | Constructor and Description |
|---|---|
| protected |
| buf | back to summary |
|---|---|
| protected final char[] buf | |
| escapeHandler | back to summary |
|---|---|
| private final CharacterEscapeHandler escapeHandler | |
| FI_OUTPUT_CTOR | back to summary |
|---|---|
| private static final Constructor<? extends XmlOutput> FI_OUTPUT_CTOR | |
| FI_STAX_WRITER_CLASS | back to summary |
|---|---|
| private static final Class<T> FI_STAX_WRITER_CLASS Reference to FI's XMLStreamWriter class, if FI can be loaded. | |
| out | back to summary |
|---|---|
| private final XMLStreamWriter out | |
| STAXEX_OUTPUT_CTOR | back to summary |
|---|---|
| private static final Constructor<? extends XmlOutput> STAXEX_OUTPUT_CTOR | |
| STAXEX_WRITER_CLASS | back to summary |
|---|---|
| private static final Class<T> STAXEX_WRITER_CLASS | |
| writerWrapper | back to summary |
|---|---|
| private final XMLStreamWriterOutput. | |
| XMLStreamWriterOutput | back to summary |
|---|---|
| protected XMLStreamWriterOutput(XMLStreamWriter out, CharacterEscapeHandler escapeHandler) | |
| attribute | back to summary |
|---|---|
| public void attribute(int prefix, String localName, String value) throws IOException, XMLStreamException Implements abstract org. Implements org.
| |
| beginStartTag | back to summary |
|---|---|
| public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException Implements abstract org. Implements org.
| |
| create | back to summary |
|---|---|
| public static XmlOutput create(XMLStreamWriter out, JAXBContextImpl context, CharacterEscapeHandler escapeHandler) Creates a new | |
| 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, SAXException Implements abstract org. Implements org.
| |
| endTag | back to summary |
|---|---|
| public void endTag(int prefix, String localName) throws IOException, SAXException, XMLStreamException Implements abstract org. Implements org.
| |
| initFastInfosetOutputClass | back to summary |
|---|---|
| private static Constructor | |
| initFIStAXWriterClass | back to summary |
|---|---|
| private static Class | |
| initStAXExOutputClass | back to summary |
|---|---|
| private static Constructor | |
| initStAXExWriterClass | back to summary |
|---|---|
| private static Class | |
| 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 needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException Implements org. Doc from org. Writes XML text with character escaping, if necessary.
| |
| text | back to summary |
|---|---|
| public void text(Pcdata value, boolean needsSeparatingWhitespace) throws IOException, SAXException, XMLStreamException Implements org. Doc from org. Writes XML text with character escaping, if necessary.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final XMLStreamWriter |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. Closes the stream, flushing it first. |
| public void | flush()
Implements abstract java. Implements java. Flushes the stream. |
| public void | write(char[] cbuf, int off, int len)
Implements abstract java. Writes a portion of an array of characters. |
| public void |
| writer | back to summary |
|---|---|
| private final XMLStreamWriter writer | |
| XmlStreamOutWriterAdapter | back to summary |
|---|---|
| private XmlStreamOutWriterAdapter(XMLStreamWriter writer) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. Doc from java. Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams. If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| write | back to summary |
|---|---|
| public void write(char[] cbuf, int off, int len) throws IOException Implements abstract java. Doc from java. Writes a portion of an array of characters.
| |
| writeEntityRef | back to summary |
|---|---|
| public void writeEntityRef(String entityReference) throws XMLStreamException | |