XMLStreamReader implementations.
| Modifier and Type | Class and Description |
|---|---|
| protected static enum |
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| protected final WriterConfig | |
| protected OutputElement | _currElem
We'll use a virtual root element (like a document node of sort), to simplify other processing, basically such that there is always a current output element instance, even when in prolog or epilog. |
| protected String | _dtdRootElemName
Value passed as the expected root element, when using the multiple
argument |
| protected OutputElement | |
| protected int | |
| protected NamespaceContext | _rootNsContext
Root namespace context defined for this writer, if any. |
| protected StreamWriterBase. | |
| protected boolean | _stateAnyOutput
Flag that is set to true first time something has been output. |
| protected boolean | _stateEmptyElement
Flag that indicates that current element is an empty element (one that is explicitly defined as one, by calling a method -- NOT one that just happens to be empty). |
| protected boolean | _stateStartElementOpen
Flag that is set during time that a start element is "open", ie. |
| protected WNameTable | |
| protected XMLValidator | _validator
Optional validator to use for validating output against one or more schemas, and/or for safe pretty-printing (indentation). |
| protected ValueEncoderFactory | _valueEncoderFactory
When outputting using Typed Access API, we will need encoders. |
| protected int | _vldContent
State value used with validation, to track types of content that is allowed at this point in output stream. |
| protected ValidationProblemHandler | _vldProblemHandler
Custom validation problem handler, if any. |
| protected final XmlWriter | _xmlWriter
Actual physical writer to output serialized XML content to |
| pack-priv static final int | MAX_POOL_SIZE
Although pooled objects are small, let's limit the pool size nonetheless, to minimize extra memory usage for deeply nested documents. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | _closeStartElement(boolean emptyElem)
Method called to close an open start element, when another main-level element (not namespace declaration or attribute) is being output; except for end element which is handled differently. |
| private final void | |
| protected void | |
| protected static void | _reportNwfAttr(String msg)
This is the method called when an output method call violates attribute well-formedness checks (trying to output dup attrs) and name validaty checking is enabled. |
| protected static void | |
| protected static void | _reportNwfContent(String msg)
This is the method called when an output method call violates content well-formedness checks and content validation is enabled. |
| protected static void | |
| protected static void | |
| protected static void | _reportNwfStructure(String msg)
This is the method called when an output method call violates structural well-formedness checks and structural checking is enabled. |
| protected static void | |
| public void | |
| protected abstract String | |
| protected abstract void | |
| protected void | |
| protected void | _verifyStartElement(String prefix, String localName)
Method that is called to ensure that we can start writing an element, both from structural point of view, and from syntactic (close previously open start element, if any). |
| protected final void | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected final void | |
| protected void | |
| protected void | |
| protected void | |
| public int | addDefaultAttribute(String localName, String uri, String prefix, String value)
Implements org. |
| public void | close()
Implements javax. |
| public void | closeCompletely()
Implements org. javax.,
except that this method also does close the underlying output
destination (stream) if it has not yet been closed.
|
| public int | findAttributeIndex(String nsURI, String localName)
Implements org. |
| public void | flush()
Implements javax. |
| public int | getAttributeCount()
Implements org. |
| public String | getAttributeLocalName(int index)
Implements org. |
| public String | getAttributeNamespace(int index)
Implements org. |
| public String | getAttributePrefix(int index)
Implements org. |
| public String | getAttributeType(int index)
Implements org. |
| public String | getAttributeValue(int index)
Implements org. |
| public String | getAttributeValue(String nsURI, String localName)
Implements org. |
| public String | getBaseUri()
Implements org. |
| public QName | getCurrentElementName()
Implements org. |
| public String | getEncoding()
Implements abstract org. Implements org. |
| public XMLStreamLocation2 | getLocation()
Implements abstract org. Implements org. |
| public final NamespaceContext | getNamespaceContext()
Implements javax. |
| public String | getNamespaceURI(String
prefix to look up prefix)Implements javax. |
| public String | getPrefix(String
URI of Namespace to lookup uri)Implements javax. |
| public Iterator | getPrefixes(String
URI of Namespace to lookup uri)Implements javax. |
| public Object | getProperty(String
The name of the property, may not be null name)Implements javax. |
| public Location | getValidationLocation()
Implements org. |
| public String | getXmlVersion()
Implements org. |
| protected final boolean | |
| public boolean | |
| public boolean | isPropertySupported(String name)
Overrides org. Implements org. javax., used
to determine whether a property is supported by the Writer
instance.
|
| public boolean | |
| protected static void | |
| protected static void | reportIllegalMethod(String msg)
Method called when an illegal method (namespace-specific method on non-ns writer) is called by the application. |
| public void | reportProblem(XMLValidationProblem prob)
Implements org. |
| private void | |
| public abstract void | setDefaultNamespace(String
the uri to bind to the default namespace, may be null uri)Redeclares javax. |
| public void | setNamespaceContext(NamespaceContext
the namespace context to use for this writer, may not be null ctxt)Implements javax. |
| public final void | setPrefix(String
the prefix to bind to the uri, may not be null prefix, String the uri to bind to the prefix, may be null uri)Implements javax. |
| public boolean | Returns: True, if the specified property was succesfully set to specified value; false if its value was not changedName of the property to set name, Object Value to set property to. value)Overrides org. Implements org. org.
instance.
|
| public ValidationProblemHandler | setValidationProblemHandler(ValidationProblemHandler
Handler to install, if non null; if null, indicates that
the default (implementation-specific) handling should be used h)Overrides org. Implements org. |
| public XMLValidator | stopValidatingAgainst(XMLValidationSchema schema)
Overrides org. Implements org. validateAgainst
was called earlier.
|
| public XMLValidator | stopValidatingAgainst(XMLValidator validator)
Overrides org. Implements org. |
| protected static void | |
| protected static void | |
| protected static void | |
| public String | |
| public XMLValidator | validateAgainst(XMLValidationSchema schema)
Overrides org. Implements org. XMLValidator instance from the
given schema (unless a validator for that schema has already been
added),
initialize it if necessary, and make validatable object (reader,
writer)
call appropriate validation methods from this point on until the
end of the document (that is, it's not scoped with sub-trees), or until
validator is removed by an explicit call to
stopValidatingAgainst.
|
| protected final ValueEncoderFactory | |
| public final void | writeAttribute(String
the local name of the attribute localName, String the value of the attribute value)Implements javax. |
| public abstract void | writeAttribute(String
the uri of the prefix for this attribute nsURI, String the local name of the attribute localName, String the value of the attribute value)Redeclares javax. |
| public abstract void | writeAttribute(String
the prefix for this attribute prefix, String the uri of the prefix for this attribute nsURI, String the local name of the attribute localName, String the value of the attribute value)Redeclares javax. |
| public void | writeBinary(byte[]
The array from which to write the bytes. value, int The index in the array from which writing starts. from, int The number of bytes to write. length)Implements org. Write binary content as base64 encoded characters to the output. |
| public void | writeBinary(Base64Variant v, byte[] value, int from, int length)
Implements org. |
| public void | writeBinaryAttribute(String
The attribute's prefix. prefix, String The attribute's URI. nsURI, String The attribute's local name. localName, byte[] The array from which to write the bytes. value)Implements org. Write a byte array attribute. |
| public void | writeBinaryAttribute(Base64Variant v, String prefix, String nsURI, String localName, byte[] value)
Implements org. |
| public void | writeBoolean(boolean
The boolean value to write. b)Implements org. |
| public final void | writeBooleanAttribute(String
The attribute's prefix. Null or "" if no prefix is to be used prefix, String The attribute's URI (can be either null or empty String for "no namespace") nsURI, String The attribute's local name localName, boolean The boolean value to write. value)Implements org. |
| public void | writeCData(String
the data contained in the CData Section, may not be null data)Implements javax. |
| public void | writeCData(char[] cbuf, int start, int len)
Overrides org. Implements org. |
| public void | writeCharacters(char[]
the value to write text, int the starting position in the array start, int the number of characters to write len)Implements javax. |
| public void | writeCharacters(String
the value to write text)Implements javax. |
| public void | writeComment(String
the data contained in the comment, may be null data)Implements javax. |
| public void | writeDecimal(BigDecimal value)
Implements org. |
| public final void | writeDecimalAttribute(String prefix, String nsURI, String localName, BigDecimal value)
Implements org. |
| public abstract void | writeDefaultNamespace(String
the uri to bind the default namespace to nsURI)Redeclares javax. |
| public void | writeDouble(double value)
Implements org. |
| public void | writeDoubleArray(double[] value, int from, int length)
Implements org. |
| public void | writeDoubleArrayAttribute(String prefix, String nsURI, String localName, double[] value)
Implements org. |
| public final void | writeDoubleAttribute(String prefix, String nsURI, String localName, double value)
Implements org. |
| public final void | writeDTD(String
the DTD to be written dtd)Implements javax. |
| public void | |
| public void | writeDTD(String rootName, String systemId, String publicId, String internalSubset)
Overrides org. Implements org. |
| public void | writeEmptyElement(String
local name of the tag, may not be null localName)Implements javax. |
| public abstract void | writeEmptyElement(String
the uri to bind the tag to, may not be null nsURI, String local name of the tag, may not be null localName)Redeclares javax. |
| public abstract void | writeEmptyElement(String
the prefix of the tag, may not be null prefix, String local name of the tag, may not be null localName, String the uri to bind the tag to, may not be null nsURI)Redeclares javax. |
| public void | writeEndDocument()
Implements javax. |
| public void | writeEndElement()
Implements javax. |
| public void | writeEntityRef(String
the name of the entity name)Implements javax. |
| public void | writeFloat(float value)
Implements org. |
| public void | writeFloatArray(float[] value, int from, int length)
Implements org. |
| public void | writeFloatArrayAttribute(String prefix, String nsURI, String localName, float[] value)
Implements org. |
| public final void | writeFloatAttribute(String prefix, String nsURI, String localName, float value)
Implements org. |
| public void | writeFullEndElement()
Overrides org. Implements org. writeEndElement, but never allows implicit
creation of empty elements.
|
| public void | writeInt(int value)
Implements org. |
| public final void | writeIntArray(int[]
The array from which to write the ints. value, int The index in the array from which writing starts. from, int The number of ints to write. length)Implements org. Write int array to the output. |
| public void | writeIntArrayAttribute(String
The attribute's prefix. prefix, String The attribute's URI. nsURI, String The attribute's local name. localName, int[] The array from which to write the ints. value)Implements org. Write int array attribute. |
| public final void | writeIntAttribute(String
The attribute's prefix. Null or "" if no prefix is to be used prefix, String The attribute's URI (can be either null or empty String for "no namespace") nsURI, String The attribute's local name localName, int The integer value to write. value)Implements org. |
| public void | writeInteger(BigInteger value)
Implements org. |
| public final void | writeIntegerAttribute(String prefix, String nsURI, String localName, BigInteger value)
Implements org. |
| public void | writeLong(long value)
Implements org. |
| public void | writeLongArray(long[] value, int from, int length)
Implements org. |
| public void | writeLongArrayAttribute(String prefix, String nsURI, String localName, long[] value)
Implements org. |
| public final void | writeLongAttribute(String
The attribute's prefix. Null or "" if no prefix is to be used prefix, String The attribute's URI (can be either null or empty String for "no namespace") nsURI, String The attribute's local name localName, long The long value to write. value)Implements org. |
| public abstract void | writeNamespace(String
the prefix to bind this namespace to prefix, String the uri to bind the prefix to nsURI)Redeclares javax. |
| public void | writeProcessingInstruction(String
the target of the processing instruction, may not be null target)Implements javax. |
| public void | writeProcessingInstruction(String
the target of the processing instruction, may not be null target, String the data contained in the processing instruction, may not be null data)Implements javax. |
| public void | |
| public final void | writeQNameAttribute(String prefix, String nsURI, String localName, QName value)
Implements org. |
| public void | writeRaw(String text)
Overrides org. Implements org. |
| public void | writeRaw(String text, int start, int offset)
Implements abstract org. Implements org. |
| public void | writeRaw(char[] text, int offset, int length)
Implements abstract org. Implements org. |
| public void | writeSpace(String text)
Overrides org. Implements org. |
| public void | writeSpace(char[] cbuf, int offset, int len)
Overrides org. Implements org. |
| public void | writeStartDocument()
Implements javax. |
| public void | writeStartDocument(String
version of the xml document version)Implements javax. |
| public void | writeStartDocument(String
encoding of the xml declaration encoding, String version of the xml document version)Implements javax. |
| public void | writeStartDocument(String version, String encoding, boolean standAlone)
Implements abstract org. Implements org. |
| public void | writeStartElement(String
local name of the tag, may not be null localName)Implements javax. |
| public abstract void | writeStartElement(String
the namespaceURI of the prefix to use, may not be null nsURI, String local name of the tag, may not be null localName)Redeclares javax. |
| public abstract void | writeStartElement(String
the prefix of the tag, may not be null prefix, String local name of the tag, may not be null localName, String the uri to bind the prefix to, may not be null nsURI)Redeclares javax. |
| public abstract void | writeTypedAttribute(String prefix, String nsURI, String localName, AsciiValueEncoder enc)
Need to leave implementation of this method abstract, because repairing and non-repairing modes differ in how names are handled. |
| private final void |