|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fasterxml.aalto.in.StreamReaderImpl
public final class StreamReaderImpl
Basic backend-independent XMLStreamReader implementation.
While the read implements Stax API, most of real work is delegated
to input (and thereby, encoding) specific backend implementations.
| Field Summary | |
|---|---|
protected int |
_attrCount
If the current event is START_ELEMENT, number
of attributes the start element has. |
protected org.codehaus.stax2.ri.typed.CharArrayBase64Decoder |
_base64Decoder
Lazily-constructed decoder object for decoding base64 encoded element binary content. |
protected boolean |
_cfgCoalesceText
|
protected boolean |
_cfgReportTextAsChars
|
protected PName |
_currName
Prefixed name associated with the current event, if any. |
protected int |
_currToken
|
protected org.codehaus.stax2.ri.typed.ValueDecoderFactory |
_decoderFactory
Factory used for constructing decoders we need for typed access |
protected int |
_parseState
Main parsing/tokenization state (STATE_xxx) |
protected XmlScanner |
_scanner
Underlying XML scanner |
| Fields inherited from interface org.codehaus.stax2.XMLStreamReader2 |
|---|
FEATURE_DTD_OVERRIDE |
| Fields inherited from interface javax.xml.stream.XMLStreamConstants |
|---|
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
| Constructor Summary | |
|---|---|
StreamReaderImpl(XmlScanner scanner)
|
|
| Method Summary | |
|---|---|
protected org.codehaus.stax2.ri.typed.CharArrayBase64Decoder |
_base64Decoder()
|
protected void |
_closeScanner(boolean forceStreamClose)
Method called to close scanner, by asking it to release resource it has, and potentially also close the underlying stream. |
protected javax.xml.stream.XMLStreamException |
_constructUnexpectedInTyped(int nextToken)
|
protected org.codehaus.stax2.ri.typed.ValueDecoderFactory |
_decoderFactory()
|
void |
close()
Note: as per StAX 1.0 specs, this method does NOT close the underlying input reader. |
void |
closeCompletely()
|
static StreamReaderImpl |
construct(InputBootstrapper bs)
|
int |
findAttributeIndex(java.lang.String nsURI,
java.lang.String localName)
|
void |
getAttributeAs(int index,
org.codehaus.stax2.typed.TypedValueDecoder tvd)
|
int |
getAttributeAsArray(int index,
org.codehaus.stax2.typed.TypedArrayDecoder tad)
Method that allows reading contents of an attribute as an array of whitespace-separate tokens, decoded using specified decoder. |
byte[] |
getAttributeAsBinary(int index)
|
byte[] |
getAttributeAsBinary(int index,
org.codehaus.stax2.typed.Base64Variant v)
|
boolean |
getAttributeAsBoolean(int index)
|
java.math.BigDecimal |
getAttributeAsDecimal(int index)
|
double |
getAttributeAsDouble(int index)
|
double[] |
getAttributeAsDoubleArray(int index)
|
float |
getAttributeAsFloat(int index)
|
float[] |
getAttributeAsFloatArray(int index)
|
int |
getAttributeAsInt(int index)
|
int[] |
getAttributeAsIntArray(int index)
|
java.math.BigInteger |
getAttributeAsInteger(int index)
|
long |
getAttributeAsLong(int index)
|
long[] |
getAttributeAsLongArray(int index)
|
javax.xml.namespace.QName |
getAttributeAsQName(int index)
|
int |
getAttributeCount()
|
int |
getAttributeIndex(java.lang.String namespaceURI,
java.lang.String localName)
|
org.codehaus.stax2.AttributeInfo |
getAttributeInfo()
|
java.lang.String |
getAttributeLocalName(int index)
|
javax.xml.namespace.QName |
getAttributeName(int index)
|
java.lang.String |
getAttributeNamespace(int index)
|
java.lang.String |
getAttributePrefix(int index)
|
java.lang.String |
getAttributeType(int index)
|
java.lang.String |
getAttributeValue(int index)
|
java.lang.String |
getAttributeValue(java.lang.String nsURI,
java.lang.String localName)
|
java.lang.String |
getCharacterEncodingScheme()
As per Stax (1.0) specs, needs to return whatever xml declaration claimed encoding is, if any; or null if no xml declaration found. |
org.codehaus.stax2.XMLStreamLocation2 |
getCurrentLocation()
|
int |
getDepth()
|
org.codehaus.stax2.DTDInfo |
getDTDInfo()
Since this class implements DTDInfo, method can just
return this. |
java.lang.String |
getDTDInternalSubset()
|
java.lang.String |
getDTDPublicId()
|
java.lang.String |
getDTDRootName()
|
java.lang.String |
getDTDSystemId()
|
void |
getElementAs(org.codehaus.stax2.typed.TypedValueDecoder tvd)
|
byte[] |
getElementAsBinary()
|
byte[] |
getElementAsBinary(org.codehaus.stax2.typed.Base64Variant v)
|
boolean |
getElementAsBoolean()
|
java.math.BigDecimal |
getElementAsDecimal()
|
double |
getElementAsDouble()
|
float |
getElementAsFloat()
|
int |
getElementAsInt()
|
java.math.BigInteger |
getElementAsInteger()
|
long |
getElementAsLong()
|
javax.xml.namespace.QName |
getElementAsQName()
|
java.lang.String |
getElementText()
From StAX specs: Reads the content of a text-only element, an exception is thrown if this is not a text-only element. |
java.lang.String |
getEncoding()
As per Stax (1.0) specs, needs to return whatever parser determined the encoding was, if it was able to figure it out. |
long |
getEndingByteOffset()
|
long |
getEndingCharOffset()
|
org.codehaus.stax2.XMLStreamLocation2 |
getEndLocation()
|
int |
getEventType()
Returns type of the last event returned; or START_DOCUMENT before any events has been explicitly returned. |
java.lang.Object |
getFeature(java.lang.String name)
|
int |
getIdAttributeIndex()
|
protected javax.xml.stream.Location |
getLastCharLocation()
|
java.lang.String |
getLocalName()
|
javax.xml.stream.Location |
getLocation()
|
org.codehaus.stax2.LocationInfo |
getLocationInfo()
Location information is always accessible, for this reader. |
javax.xml.namespace.QName |
getName()
|
javax.xml.namespace.NamespaceContext |
getNamespaceContext()
|
int |
getNamespaceCount()
|
java.lang.String |
getNamespacePrefix(int index)
|
java.lang.String |
getNamespaceURI()
|
java.lang.String |
getNamespaceURI(int index)
|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
|
javax.xml.namespace.NamespaceContext |
getNonTransientNamespaceContext()
|
int |
getNotationAttributeIndex()
|
java.lang.String |
getPIData()
|
java.lang.String |
getPITarget()
|
java.lang.String |
getPrefix()
|
java.lang.String |
getPrefixedName()
|
java.lang.Object |
getProcessedDTD()
Note: DTD-handling sub-classes need to override this method. |
org.codehaus.stax2.validation.DTDValidationSchema |
getProcessedDTDSchema()
Sub-class will override this method |
java.lang.Object |
getProperty(java.lang.String name)
|
XmlScanner |
getScanner()
Should not really be public, but needed by SAX code |
long |
getStartingByteOffset()
|
long |
getStartingCharOffset()
|
org.codehaus.stax2.XMLStreamLocation2 |
getStartLocation()
|
java.lang.String |
getText()
|
int |
getText(java.io.Writer w,
boolean preserveContents)
Method similar to getText(), except
that it just uses provided Writer to write all textual content. |
char[] |
getTextCharacters()
|
int |
getTextCharacters(int srcStart,
char[] target,
int targetStart,
int len)
|
int |
getTextLength()
|
int |
getTextStart()
|
java.lang.String |
getVersion()
|
protected int |
handlePrologEoi(boolean isProlog)
|
protected void |
handleTreeEoi()
Method called when hitting an end-of-input within tree, after a valid token |
boolean |
hasName()
|
boolean |
hasNext()
|
boolean |
hasText()
|
boolean |
isAttributeSpecified(int index)
|
boolean |
isCharacters()
|
boolean |
isEmptyElement()
|
boolean |
isEndElement()
|
boolean |
isPropertySupported(java.lang.String name)
|
boolean |
isStandalone()
|
boolean |
isStartElement()
|
boolean |
isWhiteSpace()
|
int |
next()
|
int |
nextTag()
|
int |
readElementAsArray(org.codehaus.stax2.typed.TypedArrayDecoder dec)
|
int |
readElementAsBinary(byte[] resultBuffer,
int offset,
int maxLength)
|
int |
readElementAsBinary(byte[] resultBuffer,
int offset,
int maxLength,
org.codehaus.stax2.typed.Base64Variant v)
|
int |
readElementAsDoubleArray(double[] value,
int from,
int length)
|
int |
readElementAsFloatArray(float[] value,
int from,
int length)
|
int |
readElementAsIntArray(int[] value,
int from,
int length)
|
int |
readElementAsLongArray(long[] value,
int from,
int length)
|
protected void |
reportInvalidAttrIndex(int index)
|
void |
require(int type,
java.lang.String nsUri,
java.lang.String localName)
|
void |
setFeature(java.lang.String name,
java.lang.Object value)
|
boolean |
setProperty(java.lang.String name,
java.lang.Object value)
|
org.codehaus.stax2.validation.ValidationProblemHandler |
setValidationProblemHandler(org.codehaus.stax2.validation.ValidationProblemHandler h)
|
void |
skipElement()
|
boolean |
standaloneSet()
|
org.codehaus.stax2.validation.XMLValidator |
stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema)
|
org.codehaus.stax2.validation.XMLValidator |
stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidator validator)
|
protected void |
throwFromIOE(java.io.IOException ioe)
|
protected void |
throwUnexpectedEOI(java.lang.String msg)
|
protected void |
throwWfe(java.lang.String msg)
Throws generic parse error with specified message and current parsing location. |
java.lang.String |
toString()
|
org.codehaus.stax2.validation.XMLValidator |
validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema)
|
protected javax.xml.namespace.QName |
verifyQName(javax.xml.namespace.QName n)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final XmlScanner _scanner
protected final boolean _cfgCoalesceText
protected final boolean _cfgReportTextAsChars
protected int _currToken
protected int _parseState
protected PName _currName
protected int _attrCount
START_ELEMENT, number
of attributes the start element has. Otherwise undefined.
Updated by reader, to make index checks for other attribute
access methods simpler.
protected org.codehaus.stax2.ri.typed.ValueDecoderFactory _decoderFactory
protected org.codehaus.stax2.ri.typed.CharArrayBase64Decoder _base64Decoder
| Constructor Detail |
|---|
public StreamReaderImpl(XmlScanner scanner)
| Method Detail |
|---|
public static StreamReaderImpl construct(InputBootstrapper bs)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic XmlScanner getScanner()
public java.lang.String getCharacterEncodingScheme()
Note: method name is rather confusing (compare to getEncoding()).
getCharacterEncodingScheme in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getEncoding()
Reader), it should return null.
getEncoding in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getVersion()
getVersion in interface javax.xml.stream.XMLStreamReaderpublic boolean isStandalone()
isStandalone in interface javax.xml.stream.XMLStreamReaderpublic boolean standaloneSet()
standaloneSet in interface javax.xml.stream.XMLStreamReaderpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface javax.xml.stream.XMLStreamReaderpublic int getAttributeCount()
getAttributeCount in interface javax.xml.stream.XMLStreamReadergetAttributeCount in interface org.codehaus.stax2.AttributeInfopublic java.lang.String getAttributeLocalName(int index)
getAttributeLocalName in interface javax.xml.stream.XMLStreamReaderpublic javax.xml.namespace.QName getAttributeName(int index)
getAttributeName in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getAttributeNamespace(int index)
getAttributeNamespace in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getAttributePrefix(int index)
getAttributePrefix in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getAttributeType(int index)
getAttributeType in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getAttributeValue(int index)
getAttributeValue in interface javax.xml.stream.XMLStreamReader
public java.lang.String getAttributeValue(java.lang.String nsURI,
java.lang.String localName)
getAttributeValue in interface javax.xml.stream.XMLStreamReader
public java.lang.String getElementText()
throws javax.xml.stream.XMLStreamException
Reads the content of a text-only element, an exception is thrown if this is not a text-only element. Regardless of value of javax.xml.stream.isCoalescing this method always returns coalesced content.
Precondition: the current event is START_ELEMENT.
Postcondition: the current event is the corresponding END_ELEMENT.
getElementText in interface javax.xml.stream.XMLStreamReaderjavax.xml.stream.XMLStreamExceptionpublic int getEventType()
getEventType in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getLocalName()
getLocalName in interface javax.xml.stream.XMLStreamReaderpublic javax.xml.namespace.QName getName()
getName in interface javax.xml.stream.XMLStreamReaderpublic javax.xml.namespace.NamespaceContext getNamespaceContext()
getNamespaceContext in interface javax.xml.stream.XMLStreamReaderpublic int getNamespaceCount()
getNamespaceCount in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getNamespacePrefix(int index)
getNamespacePrefix in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getNamespaceURI()
getNamespaceURI in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getNamespaceURI(int index)
getNamespaceURI in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getPIData()
getPIData in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getPITarget()
getPITarget in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getPrefix()
getPrefix in interface javax.xml.stream.XMLStreamReaderpublic java.lang.String getText()
getText in interface javax.xml.stream.XMLStreamReaderpublic char[] getTextCharacters()
getTextCharacters in interface javax.xml.stream.XMLStreamReader
public int getTextCharacters(int srcStart,
char[] target,
int targetStart,
int len)
getTextCharacters in interface javax.xml.stream.XMLStreamReaderpublic int getTextLength()
getTextLength in interface javax.xml.stream.XMLStreamReaderpublic int getTextStart()
getTextStart in interface javax.xml.stream.XMLStreamReaderpublic boolean hasName()
hasName in interface javax.xml.stream.XMLStreamReaderpublic boolean hasNext()
hasNext in interface javax.xml.stream.XMLStreamReaderpublic boolean hasText()
hasText in interface javax.xml.stream.XMLStreamReaderpublic boolean isAttributeSpecified(int index)
isAttributeSpecified in interface javax.xml.stream.XMLStreamReaderpublic boolean isCharacters()
isCharacters in interface javax.xml.stream.XMLStreamReaderpublic boolean isEndElement()
isEndElement in interface javax.xml.stream.XMLStreamReaderpublic boolean isStartElement()
isStartElement in interface javax.xml.stream.XMLStreamReaderpublic boolean isWhiteSpace()
isWhiteSpace in interface javax.xml.stream.XMLStreamReader
public void require(int type,
java.lang.String nsUri,
java.lang.String localName)
throws javax.xml.stream.XMLStreamException
require in interface javax.xml.stream.XMLStreamReaderjavax.xml.stream.XMLStreamException
public int next()
throws javax.xml.stream.XMLStreamException
next in interface javax.xml.stream.XMLStreamReaderjavax.xml.stream.XMLStreamException
public int nextTag()
throws javax.xml.stream.XMLStreamException
nextTag in interface javax.xml.stream.XMLStreamReaderjavax.xml.stream.XMLStreamException
public void close()
throws javax.xml.stream.XMLStreamException
Note: as per StAX 1.0 specs, this method does NOT close the underlying
input reader. (that is, unless the new StAX2 property
org.codehaus.stax2.XMLInputFactory2#P_AUTO_CLOSE_INPUT is
set to true).
close in interface javax.xml.stream.XMLStreamReaderjavax.xml.stream.XMLStreamExceptionpublic javax.xml.stream.Location getLocation()
getLocation in interface javax.xml.stream.XMLStreamReadergetLocation in interface org.codehaus.stax2.LocationInfo
public boolean getElementAsBoolean()
throws javax.xml.stream.XMLStreamException
getElementAsBoolean in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int getElementAsInt()
throws javax.xml.stream.XMLStreamException
getElementAsInt in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public long getElementAsLong()
throws javax.xml.stream.XMLStreamException
getElementAsLong in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public float getElementAsFloat()
throws javax.xml.stream.XMLStreamException
getElementAsFloat in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public double getElementAsDouble()
throws javax.xml.stream.XMLStreamException
getElementAsDouble in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public java.math.BigInteger getElementAsInteger()
throws javax.xml.stream.XMLStreamException
getElementAsInteger in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public java.math.BigDecimal getElementAsDecimal()
throws javax.xml.stream.XMLStreamException
getElementAsDecimal in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public javax.xml.namespace.QName getElementAsQName()
throws javax.xml.stream.XMLStreamException
getElementAsQName in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public final byte[] getElementAsBinary()
throws javax.xml.stream.XMLStreamException
getElementAsBinary in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public void getElementAs(org.codehaus.stax2.typed.TypedValueDecoder tvd)
throws javax.xml.stream.XMLStreamException
getElementAs in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public byte[] getElementAsBinary(org.codehaus.stax2.typed.Base64Variant v)
throws javax.xml.stream.XMLStreamException
getElementAsBinary in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int readElementAsIntArray(int[] value,
int from,
int length)
throws javax.xml.stream.XMLStreamException
readElementAsIntArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int readElementAsLongArray(long[] value,
int from,
int length)
throws javax.xml.stream.XMLStreamException
readElementAsLongArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int readElementAsFloatArray(float[] value,
int from,
int length)
throws javax.xml.stream.XMLStreamException
readElementAsFloatArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int readElementAsDoubleArray(double[] value,
int from,
int length)
throws javax.xml.stream.XMLStreamException
readElementAsDoubleArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public final int readElementAsArray(org.codehaus.stax2.typed.TypedArrayDecoder dec)
throws javax.xml.stream.XMLStreamException
readElementAsArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public final int readElementAsBinary(byte[] resultBuffer,
int offset,
int maxLength)
throws javax.xml.stream.XMLStreamException
readElementAsBinary in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int readElementAsBinary(byte[] resultBuffer,
int offset,
int maxLength,
org.codehaus.stax2.typed.Base64Variant v)
throws javax.xml.stream.XMLStreamException
readElementAsBinary in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int getAttributeIndex(java.lang.String namespaceURI,
java.lang.String localName)
getAttributeIndex in interface org.codehaus.stax2.typed.TypedXMLStreamReader
public boolean getAttributeAsBoolean(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsBoolean in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int getAttributeAsInt(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsInt in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public long getAttributeAsLong(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsLong in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public float getAttributeAsFloat(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsFloat in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public double getAttributeAsDouble(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsDouble in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public java.math.BigInteger getAttributeAsInteger(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsInteger in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public java.math.BigDecimal getAttributeAsDecimal(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsDecimal in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public javax.xml.namespace.QName getAttributeAsQName(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsQName in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public void getAttributeAs(int index,
org.codehaus.stax2.typed.TypedValueDecoder tvd)
throws javax.xml.stream.XMLStreamException
getAttributeAs in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int[] getAttributeAsIntArray(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsIntArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public long[] getAttributeAsLongArray(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsLongArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public float[] getAttributeAsFloatArray(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsFloatArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public double[] getAttributeAsDoubleArray(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsDoubleArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public int getAttributeAsArray(int index,
org.codehaus.stax2.typed.TypedArrayDecoder tad)
throws javax.xml.stream.XMLStreamException
getAttributeAsArray in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public byte[] getAttributeAsBinary(int index)
throws javax.xml.stream.XMLStreamException
getAttributeAsBinary in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
public byte[] getAttributeAsBinary(int index,
org.codehaus.stax2.typed.Base64Variant v)
throws javax.xml.stream.XMLStreamException
getAttributeAsBinary in interface org.codehaus.stax2.typed.TypedXMLStreamReaderjavax.xml.stream.XMLStreamException
protected javax.xml.namespace.QName verifyQName(javax.xml.namespace.QName n)
throws org.codehaus.stax2.typed.TypedXMLStreamException
org.codehaus.stax2.typed.TypedXMLStreamExceptionpublic java.lang.Object getFeature(java.lang.String name)
getFeature in interface org.codehaus.stax2.XMLStreamReader2
public void setFeature(java.lang.String name,
java.lang.Object value)
setFeature in interface org.codehaus.stax2.XMLStreamReader2public boolean isPropertySupported(java.lang.String name)
isPropertySupported in interface org.codehaus.stax2.XMLStreamReader2
public boolean setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface org.codehaus.stax2.XMLStreamReader2name - Name of the property to setvalue - Value to set property to.
public void skipElement()
throws javax.xml.stream.XMLStreamException
skipElement in interface org.codehaus.stax2.XMLStreamReader2javax.xml.stream.XMLStreamException
public org.codehaus.stax2.AttributeInfo getAttributeInfo()
throws javax.xml.stream.XMLStreamException
getAttributeInfo in interface org.codehaus.stax2.XMLStreamReader2javax.xml.stream.XMLStreamException
public org.codehaus.stax2.DTDInfo getDTDInfo()
throws javax.xml.stream.XMLStreamException
DTDInfo, method can just
return this.
getDTDInfo in interface org.codehaus.stax2.XMLStreamReader2javax.xml.stream.XMLStreamExceptionpublic final org.codehaus.stax2.LocationInfo getLocationInfo()
getLocationInfo in interface org.codehaus.stax2.XMLStreamReader2
public int getText(java.io.Writer w,
boolean preserveContents)
throws javax.xml.stream.XMLStreamException
getText(), except
that it just uses provided Writer to write all textual content.
For further optimization, it may also be allowed to do true
pass-through, thus possibly avoiding one temporary copy of the
data.
TODO: try to optimize to allow completely streaming pass-through: currently will still read all data in memory buffers before outputting
getText in interface org.codehaus.stax2.XMLStreamReader2w - Writer to use for writing textual contentspreserveContents - If true, reader has to preserve contents
so that further calls to getText will return
proper conntets. If false, reader is allowed to skip creation
of such copies: this can improve performance, but it also means
that further calls to getText is not guaranteed to
return meaningful data.
javax.xml.stream.XMLStreamExceptionpublic int getDepth()
getDepth in interface org.codehaus.stax2.XMLStreamReader2
public boolean isEmptyElement()
throws javax.xml.stream.XMLStreamException
isEmptyElement in interface org.codehaus.stax2.XMLStreamReader2javax.xml.stream.XMLStreamExceptionpublic javax.xml.namespace.NamespaceContext getNonTransientNamespaceContext()
getNonTransientNamespaceContext in interface org.codehaus.stax2.XMLStreamReader2public java.lang.String getPrefixedName()
getPrefixedName in interface org.codehaus.stax2.XMLStreamReader2
public void closeCompletely()
throws javax.xml.stream.XMLStreamException
closeCompletely in interface org.codehaus.stax2.XMLStreamReader2javax.xml.stream.XMLStreamExceptionpublic java.lang.Object getProcessedDTD()
Note: DTD-handling sub-classes need to override this method.
getProcessedDTD in interface org.codehaus.stax2.DTDInfopublic java.lang.String getDTDRootName()
getDTDRootName in interface org.codehaus.stax2.DTDInfopublic java.lang.String getDTDPublicId()
getDTDPublicId in interface org.codehaus.stax2.DTDInfopublic java.lang.String getDTDSystemId()
getDTDSystemId in interface org.codehaus.stax2.DTDInfopublic java.lang.String getDTDInternalSubset()
getDTDInternalSubset in interface org.codehaus.stax2.DTDInfopublic org.codehaus.stax2.validation.DTDValidationSchema getProcessedDTDSchema()
getProcessedDTDSchema in interface org.codehaus.stax2.DTDInfopublic long getStartingByteOffset()
getStartingByteOffset in interface org.codehaus.stax2.LocationInfopublic long getStartingCharOffset()
getStartingCharOffset in interface org.codehaus.stax2.LocationInfo
public long getEndingByteOffset()
throws javax.xml.stream.XMLStreamException
getEndingByteOffset in interface org.codehaus.stax2.LocationInfojavax.xml.stream.XMLStreamException
public long getEndingCharOffset()
throws javax.xml.stream.XMLStreamException
getEndingCharOffset in interface org.codehaus.stax2.LocationInfojavax.xml.stream.XMLStreamExceptionpublic final org.codehaus.stax2.XMLStreamLocation2 getStartLocation()
getStartLocation in interface org.codehaus.stax2.LocationInfo
public final org.codehaus.stax2.XMLStreamLocation2 getEndLocation()
throws javax.xml.stream.XMLStreamException
getEndLocation in interface org.codehaus.stax2.LocationInfojavax.xml.stream.XMLStreamExceptionpublic final org.codehaus.stax2.XMLStreamLocation2 getCurrentLocation()
getCurrentLocation in interface org.codehaus.stax2.LocationInfo
public int findAttributeIndex(java.lang.String nsURI,
java.lang.String localName)
findAttributeIndex in interface org.codehaus.stax2.AttributeInfopublic int getIdAttributeIndex()
getIdAttributeIndex in interface org.codehaus.stax2.AttributeInfopublic int getNotationAttributeIndex()
getNotationAttributeIndex in interface org.codehaus.stax2.AttributeInfo
public org.codehaus.stax2.validation.XMLValidator validateAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema)
throws javax.xml.stream.XMLStreamException
validateAgainst in interface org.codehaus.stax2.validation.Validatablejavax.xml.stream.XMLStreamException
public org.codehaus.stax2.validation.XMLValidator stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidationSchema schema)
throws javax.xml.stream.XMLStreamException
stopValidatingAgainst in interface org.codehaus.stax2.validation.Validatablejavax.xml.stream.XMLStreamException
public org.codehaus.stax2.validation.XMLValidator stopValidatingAgainst(org.codehaus.stax2.validation.XMLValidator validator)
throws javax.xml.stream.XMLStreamException
stopValidatingAgainst in interface org.codehaus.stax2.validation.Validatablejavax.xml.stream.XMLStreamExceptionpublic org.codehaus.stax2.validation.ValidationProblemHandler setValidationProblemHandler(org.codehaus.stax2.validation.ValidationProblemHandler h)
setValidationProblemHandler in interface org.codehaus.stax2.validation.Validatableprotected javax.xml.stream.Location getLastCharLocation()
protected int handlePrologEoi(boolean isProlog)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected void handleTreeEoi()
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected void throwWfe(java.lang.String msg)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected void throwFromIOE(java.io.IOException ioe)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected void throwUnexpectedEOI(java.lang.String msg)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionprotected javax.xml.stream.XMLStreamException _constructUnexpectedInTyped(int nextToken)
protected void reportInvalidAttrIndex(int index)
protected void _closeScanner(boolean forceStreamClose)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionprotected final org.codehaus.stax2.ri.typed.ValueDecoderFactory _decoderFactory()
protected org.codehaus.stax2.ri.typed.CharArrayBase64Decoder _base64Decoder()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||