org.codehaus.stax2.XMLStreamReader2 ,
including Typed Access API (Stax2 v3.0) implementation.
Only functionality missing is DTD validation, which is provided by a
specialized sub-class.
| Modifier and Type | Field and Description |
|---|---|
| protected CharArrayBase64Decoder | _base64Decoder
Lazily-constructed decoder object for decoding base64 encoded element binary content. |
| protected ValueDecoderFactory | _decoderFactory
Factory used for constructing decoders we need for typed access |
| protected static final int | MASK_TYPED_ACCESS_ARRAY
Mask of event types that are legal (starting) states to call Typed Access API from. |
| protected static final int | |
| pack-priv static final int | MIN_BINARY_CHUNK
Minimum length of text chunks to parse before base64 decoding. |
| Access | Constructor and Description |
|---|---|
| protected | TypedStreamReader(InputBootstrapper bs, BranchingReaderSource input, ReaderCreator owner, ReaderConfig cfg, InputElementStack elemStack, boolean forER)
|
| Modifier and Type | Method and Description |
|---|---|
| protected CharArrayBase64Decoder | |
| protected TypedXMLStreamException | _constructTypeException(IllegalArgumentException
Problem as reported by converter iae, String Lexical value (element content, attribute value)
that could not be converted succesfully. lexicalValue)Method called to wrap or convert given conversion-fail exception
into a full |
| protected ValueDecoderFactory | |
| private void | _handleEmptyValue(TypedValueDecoder dec)
Method called to handle value that has empty String as representation. |
| private final void | |
| protected QName | _verifyQName(QName n)
Method called to verify validity of the parsed QName element or attribute value. |
| public static TypedStreamReader | createStreamReader(BranchingReaderSource
Input source used to read the XML document. input, ReaderCreator "Owner" of this reader, factory that created the reader;
needed for returning updated symbol table information after parsing. owner, ReaderConfig Object that contains reader configuration info. cfg, InputBootstrapper bs, boolean forER)Factory method for constructing readers. |
| public void | getAttributeAs(int index, TypedValueDecoder tvd)
Implements org. Generic access method that can be used for efficient decoding of additional types not support natively by the typed stream reader. |
| public int | Returns: Number of tokens decoded, 0 if none foundImplements org. Method that allows reading contents of an attribute as an array of whitespace-separate tokens, decoded using specified decoder. |
| public byte[] | getAttributeAsBinary(int
The attribute's index as returned by index)getAttributeIndex(String, String).Implements org. Read an attribute value as a byte array. |
| public byte[] | getAttributeAsBinary(int index, Base64Variant v)
Implements org.
|
| public boolean | getAttributeAsBoolean(int
The attribute's index as returned by index)getAttributeIndex(String, String)Implements org. Read an attribute value as a boolean. |
| public BigDecimal | getAttributeAsDecimal(int index)
Implements org.
|
| public double | getAttributeAsDouble(int index)
Implements org.
|
| public double[] | |
| public float | getAttributeAsFloat(int index)
Implements org.
|
| public float[] | |
| public int | getAttributeAsInt(int
The attribute's index as returned by index)getAttributeIndex(String, String)Implements org. Read an attribute value as a boolean. |
| public int[] | getAttributeAsIntArray(int
The attribute's index as returned by index)getAttributeIndex(String, String).Implements org. Read an attribute content as an int array. |
| public BigInteger | getAttributeAsInteger(int index)
Implements org.
|
| public long | getAttributeAsLong(int
The attribute's index as returned by index)getAttributeIndex(String, String)Implements org. Read an attribute value as a boolean. |
| public long[] | getAttributeAsLongArray(int index)
Implements org.
|
| public QName | getAttributeAsQName(int index)
Implements org.
|
| public int | getAttributeIndex(String
The attribute's namespace URI. Values of
null and "" are considered the same, i.e. "no namespace"
(or "empty" namespace) namespaceURI, String The attribute's local name. localName)Implements org. Returns the index of the attribute whose local name is
|
| public void | getElementAs(TypedValueDecoder tvd)
Implements org. Generic decoding method that can be used for efficient decoding of additional types not support natively by the typed stream reader. |
| public final byte[] | getElementAsBinary()
Implements org. Convenience method that can be used similar to read binary content
instead of
|
| public byte[] | getElementAsBinary(Base64Variant
Base64 variant content is in; needed to decode
alternative variants ("modified base64") v)Implements org. Convenience method that can be used similar to read binary content
instead of
|
| public boolean | getElementAsBoolean()
Implements org. Read an element content as a boolean. |
| public BigDecimal | |
| public double | getElementAsDouble()
Implements org. Read an element content as a 64-bit floating point value. |
| public float | getElementAsFloat()
Implements org. Read an element content as a 32-bit floating point value. |
| public int | getElementAsInt()
Implements org. Read an element content as a 32-bit integer. |
| public BigInteger | |
| public long | getElementAsLong()
Implements org. Read an element content as a 64-bit integer. |
| public QName | |
| public final int | Returns: Number of elements decoded (if any were decoded), or -1 to indicate that no more values can be decoded.Implements org. Method called to parse array of primitives. |
| public final int | readElementAsBinary(byte[] resultBuffer, int offset, int maxLength)
Implements org.
|
| public int | readElementAsBinary(byte[]
Array in which to copy decoded bytes. resultBuffer, int Starting offset of the first decoded byte
within result buffer offset, int Maximum number of bytes to decode with this call maxLength, Base64Variant v)Implements org. Read element content as decoded byte sequence; possibly only reading a fragment of all element content. |
| public int | readElementAsDoubleArray(double[] value, int from, int length)
Implements org.
|
| public int | readElementAsFloatArray(float[] value, int from, int length)
Implements org.
|
| public int | readElementAsIntArray(int[]
The array in which to copy the ints. value, int The index in the array from which copying starts. from, int The maximun number of ints to copy. Minimum value
is 1; others an length)IllegalArgumentException is thrownImplements org. Read an element content as an int array. |
| public int | readElementAsLongArray(long[] value, int from, int length)
Implements org.
|