|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface provides a typed extension to
XMLStreamReader. It defines methods for
reading XML data and converting it into Java types.
| Method Summary | |
byte[] |
getAttributeAsBinary(int index)
Read an attribute value as a byte array. |
boolean |
getAttributeAsBoolean(int index)
Read an attribute value as a boolean. |
java.math.BigDecimal |
getAttributeAsDecimal(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by decimal. |
double |
getAttributeAsDouble(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by double. |
double[] |
getAttributeAsDoubleArray(int index)
[TODO] Same as getAttributeAsIntArray(int) replacing int by double. |
float |
getAttributeAsFloat(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by float. |
float[] |
getAttributeAsFloatArray(int index)
[TODO] Same as getAttributeAsIntArray(int) replacing int by float. |
int |
getAttributeAsInt(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by int. |
int[] |
getAttributeAsIntArray(int index)
Read an attribute content as an int array. |
java.math.BigInteger |
getAttributeAsInteger(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by integer. |
long |
getAttributeAsLong(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by long. |
long[] |
getAttributeAsLongArray(int index)
[TODO] Same as getAttributeAsIntArray(int) replacing int by long. |
javax.xml.namespace.QName |
getAttributeAsQName(int index)
[TODO] Same as getAttributeAsBoolean(int) replacing boolean by QName. |
int |
getAttributeIndex(java.lang.String namespaceURI,
java.lang.String localName)
Returns the index of the attribute whose local name is localName and URI is namespaceURI
or -1 if no such attribute exists. |
int |
getElementAsBinary(byte[] value,
int from,
int length)
Read an element content as a byte array. |
boolean |
getElementAsBoolean()
Read an element content as a boolean. |
java.math.BigDecimal |
getElementAsDecimal()
[TODO] Same as getElementAsBoolean() replacing boolean by decimal. |
double |
getElementAsDouble()
[TODO] Same as getElementAsBoolean() replacing boolean by double. |
int |
getElementAsDoubleArray(double[] value,
int from,
int length)
[TODO] Same as getElementAsIntArray(int[], int, int) replacing int
by double. |
float |
getElementAsFloat()
[TODO] Same as getElementAsBoolean() replacing boolean by float. |
int |
getElementAsFloatArray(float[] value,
int from,
int length)
[TODO] Same as getElementAsIntArray(int[], int, int) replacing int
by float. |
int |
getElementAsInt()
[TODO] Same as getElementAsBoolean() replacing boolean by int. |
int |
getElementAsIntArray(int[] value,
int from,
int length)
Read an element content as an int array. |
java.math.BigInteger |
getElementAsInteger()
[TODO] Same as getElementAsBoolean() replacing boolean by long. |
long |
getElementAsLong()
[TODO] Same as getElementAsBoolean() replacing boolean by long. |
int |
getElementAsLongArray(long[] value,
int from,
int length)
[TODO] Same as getElementAsIntArray(int[], int, int) replacing int
by long. |
javax.xml.namespace.QName |
getElementAsQName()
[TODO] Same as getElementAsBoolean() replacing boolean by QName. |
| Method Detail |
public boolean getElementAsBoolean()
throws TypedXMLStreamException
Read an element content as a boolean. The lexical representation of a boolean is defined by the XML Schema boolean data type. Whitespace MUST be collapsed according to the whiteSpace facet for the XML Schema boolean data type. An exception is thrown if, after whitespace is collapsed, the resulting sequence of characters is not in the lexical space defined by the XML Schema boolean data type.
These are the pre and post conditions of calling this method, regardless of whether an exception is thrown or not.
TypedXMLStreamException - If unable to convert the resulting
character sequence into an XML Schema boolean value.
public int getElementAsInt()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by int.
TypedXMLStreamException
public long getElementAsLong()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by long.
TypedXMLStreamException
public float getElementAsFloat()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by float.
TypedXMLStreamException
public double getElementAsDouble()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by double.
TypedXMLStreamException
public java.math.BigInteger getElementAsInteger()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by long.
TypedXMLStreamException
public java.math.BigDecimal getElementAsDecimal()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by decimal.
TypedXMLStreamException
public javax.xml.namespace.QName getElementAsQName()
throws TypedXMLStreamException
[TODO]
Same as getElementAsBoolean() replacing boolean by QName.
TypedXMLStreamException
public int getElementAsBinary(byte[] value,
int from,
int length)
throws TypedXMLStreamException
Read an element content as a byte array. The lexical representation of a byte array is defined by the XML Schema base64Binary data type. Whitespace MUST be collapsed according to the whiteSpace facet for the XML Schema base64Binary data type. An exception is thrown if, after whitespace is collapsed, the resulting sequence of characters is not in the lexical space defined by the XML Schema base64Binary data type.
These are the pre and post conditions of calling this method:
value - The array in which to copy the bytes.from - The index in the array from which copying starts.length - The maximun number of bytes to copy.
length.
TypedXMLStreamException
public int getElementAsIntArray(int[] value,
int from,
int length)
throws TypedXMLStreamException
Read an element content as an int array. The lexical representation of a int array is defined by the following XML schema type:
<xs:simpleType name="intArray">
<xs:list itemType="xs:int"/>
</xs:simpleType>
whose lexical space is a list of space-separated ints.
Whitespace MUST be
collapsed
according to the whiteSpace facet for the intArray
type shown above. An exception is thrown if, after whitespace is
collapsed, the resulting sequence of characters is not in
the lexical space defined by the intArray data
type.
These are the pre and post conditions of calling this method:
value - The array in which to copy the ints.from - The index in the array from which copying starts.length - The maximun number of ints to copy.
length.
TypedXMLStreamException
public int getElementAsLongArray(long[] value,
int from,
int length)
throws TypedXMLStreamException
[TODO]
Same as getElementAsIntArray(int[], int, int) replacing int
by long.
TypedXMLStreamException
public int getElementAsFloatArray(float[] value,
int from,
int length)
throws TypedXMLStreamException
[TODO]
Same as getElementAsIntArray(int[], int, int) replacing int
by float.
TypedXMLStreamException
public int getElementAsDoubleArray(double[] value,
int from,
int length)
throws TypedXMLStreamException
[TODO]
Same as getElementAsIntArray(int[], int, int) replacing int
by double.
TypedXMLStreamException
public int getAttributeIndex(java.lang.String namespaceURI,
java.lang.String localName)
localName and URI is namespaceURI
or -1 if no such attribute exists. If
namespaceURI is null the namespace
is not checked for equality.
namespaceURI - The attribute's namespace URI.localName - The attribute's local name.
-1 if no
such attribute exists.
java.lang.IllegalStateException - If this is not
a START_ELEMENT or ATTRIBUTE event.
TypedXMLStreamException - If unable to convert the resulting
character sequence into an XML Schema boolean value.
public boolean getAttributeAsBoolean(int index)
throws TypedXMLStreamException
Read an attribute value as a boolean. The lexical representation of a boolean is defined by the XML Schema boolean data type. Whitespace MUST be collapsed according to the whiteSpace facet for the XML Schema boolean data type. An exception is thrown if, after whitespace is collapsed, the resulting sequence of characters is not in the lexical space defined by the XML Schema boolean data type.
index - The attribute's index as returned by getAttributeIndex(String, String)
java.lang.IllegalStateException - If this is not
a START_ELEMENT or ATTRIBUTE event.
TypedXMLStreamException - If unable to convert the resulting
character sequence into an XML Schema boolean value.
public int getAttributeAsInt(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by int.
TypedXMLStreamException
public long getAttributeAsLong(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by long.
TypedXMLStreamException
public float getAttributeAsFloat(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by float.
TypedXMLStreamException
public double getAttributeAsDouble(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by double.
TypedXMLStreamException
public java.math.BigInteger getAttributeAsInteger(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by integer.
TypedXMLStreamException
public java.math.BigDecimal getAttributeAsDecimal(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by decimal.
TypedXMLStreamException
public javax.xml.namespace.QName getAttributeAsQName(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsBoolean(int) replacing boolean by QName.
TypedXMLStreamException
public byte[] getAttributeAsBinary(int index)
throws TypedXMLStreamException
Read an attribute value as a byte array. The lexical representation of a byte array is defined by the XML Schema base64Binary data type. Whitespace MUST be collapsed according to the whiteSpace facet for the XML Schema base64Binary data type. An exception is thrown if, after whitespace is collapsed, the resulting sequence of characters is not in the lexical space defined by the XML Schema base64Binary data type.
index - The attribute's index as returned by getAttributeIndex(String, String).
java.lang.IllegalStateException - If this is not
a START_ELEMENT or ATTRIBUTE event.
TypedXMLStreamException - If unable to convert the resulting
character sequence into an XML Schema boolean value.
public int[] getAttributeAsIntArray(int index)
throws TypedXMLStreamException
Read an attribute content as an int array. The lexical representation of a int array is defined by the following XML schema type:
<xs:simpleType name="intArray">
<xs:list itemType="xs:int"/>
</xs:simpleType>
whose lexical space is a list of space-separated ints.
Whitespace MUST be
collapsed
according to the whiteSpace facet for the intArray
type shown above. An exception is thrown if, after whitespace is
collapsed, the resulting sequence of characters is not in
the lexical space defined by the intArray data
type.
index - The attribute's index as returned by getAttributeIndex(String, String).
java.lang.IllegalStateException - If this is not
a START_ELEMENT or ATTRIBUTE event.
TypedXMLStreamException - If unable to convert the resulting
character sequence into an XML Schema boolean value.
public long[] getAttributeAsLongArray(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsIntArray(int) replacing int by long.
TypedXMLStreamException
public float[] getAttributeAsFloatArray(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsIntArray(int) replacing int by float.
TypedXMLStreamException
public double[] getAttributeAsDoubleArray(int index)
throws TypedXMLStreamException
[TODO]
Same as getAttributeAsIntArray(int) replacing int by double.
TypedXMLStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||