Package com.sun.xml.fastinfoset.stax
Class StAXDocumentParser
- java.lang.Object
-
- com.sun.xml.fastinfoset.Decoder
-
- com.sun.xml.fastinfoset.stax.StAXDocumentParser
-
- All Implemented Interfaces:
OctetBufferListener
,javax.xml.stream.XMLStreamConstants
,javax.xml.stream.XMLStreamReader
,FastInfosetParser
,FastInfosetStreamReader
public class StAXDocumentParser extends Decoder implements javax.xml.stream.XMLStreamReader, FastInfosetStreamReader, OctetBufferListener
The Fast Infoset StAX parser.Instantiate this parser to parse a fast infoset document in accordance with the StAX API.
More than one fast infoset document may be decoded from the
InputStream
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
StAXDocumentParser.NamespaceContextImpl
-
Nested classes/interfaces inherited from class com.sun.xml.fastinfoset.Decoder
Decoder.EncodingAlgorithmInputStream
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
_algorithmData
protected int
_algorithmDataLength
protected int
_algorithmDataOffset
protected int
_algorithmId
protected java.lang.String
_algorithmURI
protected AttributesHolder
_attributes
List of attributesprotected java.lang.String
_characterEncodingScheme
protected char[]
_characters
Characters associated with event.protected int
_charactersOffset
protected boolean
_clearAttributes
protected int
_currentNamespaceAIIsEnd
protected int
_currentNamespaceAIIsStart
Namespaces associated with START_ELEMENT or END_ELEMENTprotected int
_eventType
Current eventprotected int
_internalState
protected boolean
_isAlgorithmDataCloned
protected StAXManager
_manager
protected int[]
_namespaceAIIsEndStack
protected int
_namespaceAIIsIndex
protected java.lang.String[]
_namespaceAIIsNamespaceName
protected java.lang.String[]
_namespaceAIIsPrefix
protected int[]
_namespaceAIIsPrefixIndex
protected int[]
_namespaceAIIsStartStack
protected StAXDocumentParser.NamespaceContextImpl
_nsContext
protected java.lang.String
_piData
protected java.lang.String
_piTarget
State for processing instructionprotected QualifiedName[]
_qNameStack
Stack of qualified names and namespacesprotected QualifiedName
_qualifiedName
Qualified name associated with START_ELEMENT or END_ELEMENT.protected int
_stackCount
private byte[]
base64TaleBytes
private int
base64TaleLength
protected static int
INTERNAL_STATE_DOUBLE_TERMINATE_ELEMENT
protected static int
INTERNAL_STATE_END_DOCUMENT
protected static int
INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES
protected static int
INTERNAL_STATE_START_DOCUMENT
protected static int
INTERNAL_STATE_START_ELEMENT_TERMINATE
protected static int
INTERNAL_STATE_VOID
private static java.util.logging.Logger
logger
-
Fields inherited from class com.sun.xml.fastinfoset.Decoder
_addToTable, _attributeNameTable, _attributeValueTable, _b, _bufferSize, _characterContentChunkTable, _charBuffer, _charBufferLength, _doubleTerminate, _duplicateAttributeVerifier, _elementNameTable, _identifier, _integer, _namespaceNameIndex, _needForceStreamClose, _notations, _octetBuffer, _octetBufferEnd, _octetBufferLength, _octetBufferOffset, _octetBufferStart, _parseFragments, _prefixIndex, _prefixTable, _registeredEncodingAlgorithms, _terminate, _unparsedEntities, _v, BUFFER_SIZE_SYSTEM_PROPERTY, NISTRING_EMPTY_STRING, NISTRING_ENCODING_ALGORITHM, NISTRING_INDEX, NISTRING_STRING, STRING_INTERNING_SYSTEM_PROPERTY
-
Fields inherited from interface org.jvnet.fastinfoset.FastInfosetParser
BUFFER_SIZE_PROPERTY, EXTERNAL_VOCABULARIES_PROPERTY, FORCE_STREAM_CLOSE_PROPERTY, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, STRING_INTERNING_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description StAXDocumentParser()
StAXDocumentParser(java.io.InputStream s)
StAXDocumentParser(java.io.InputStream s, StAXManager manager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
accessLocalName()
int
accessNamespaceCount()
java.lang.String
accessNamespaceURI()
java.lang.String
accessPrefix()
char[]
accessTextCharacters()
Returns a cloned char[] representation of the internal char[] buffer.int
accessTextLength()
int
accessTextStart()
private void
base64DecodeWithCloning(java.lang.StringBuffer dstBuffer, byte[] data, int offset, int length)
private void
base64DecodeWithoutCloning(java.lang.StringBuffer dstBuffer, byte[] data, int offset, int length)
protected void
checkTextState()
void
close()
protected void
convertBase64AlorithmDataToCharacters(java.lang.StringBuffer buffer)
protected void
convertEncodingAlgorithmDataToCharacters()
int
getAttributeCount()
java.lang.String
getAttributeLocalName(int index)
javax.xml.namespace.QName
getAttributeName(int index)
java.lang.String
getAttributeNamespace(int index)
java.lang.String
getAttributeNameString(int index)
java.lang.String
getAttributePrefix(int index)
AttributesHolder
getAttributesHolder()
java.lang.String
getAttributeType(int index)
java.lang.String
getAttributeValue(int index)
java.lang.String
getAttributeValue(java.lang.String namespaceURI, java.lang.String localName)
java.lang.String
getCharacterEncodingScheme()
java.lang.String
getElementText()
Reads the content of a text-only element.java.lang.String
getElementText(boolean startElementRead)
java.lang.String
getEncoding()
int
getEventType()
(package private) static java.lang.String
getEventTypeString(int eventType)
java.lang.String
getLocalName()
javax.xml.stream.Location
getLocation()
javax.xml.namespace.QName
getName()
javax.xml.namespace.NamespaceContext
getNamespaceContext()
int
getNamespaceCount()
java.lang.String
getNamespaceDecl(java.lang.String prefix)
java.lang.String
getNamespacePrefix(int index)
java.lang.String
getNamespaceURI()
java.lang.String
getNamespaceURI(int index)
java.lang.String
getNamespaceURI(java.lang.String prefix)
java.lang.String
getNameString()
java.lang.String
getPIData()
java.lang.String
getPITarget()
java.lang.String
getPrefix()
java.util.Iterator
getPrefixes()
java.lang.Object
getProperty(java.lang.String name)
java.lang.String
getText()
byte[]
getTextAlgorithmBytes()
Deprecated.was deprecated due to security reasons.int
getTextAlgorithmBytes(int sourceStart, byte[] target, int targetStart, int length)
byte[]
getTextAlgorithmBytesClone()
int
getTextAlgorithmIndex()
int
getTextAlgorithmLength()
int
getTextAlgorithmStart()
java.lang.String
getTextAlgorithmURI()
char[]
getTextCharacters()
int
getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
int
getTextLength()
int
getTextStart()
java.lang.String
getURI(java.lang.String prefix)
java.lang.String
getVersion()
boolean
hasName()
boolean
hasNext()
boolean
hasText()
boolean
hasTextAlgorithmBytes()
boolean
isAttributeSpecified(int index)
boolean
isBase64Follows()
boolean
isCharacters()
boolean
isEndElement()
boolean
isStandalone()
boolean
isStartElement()
boolean
isWhiteSpace()
Returns true if the cursor points to a character data event that consists of all whitespace Application calling this method needs to cache the value and avoid calling this method again for the same event.int
next()
int
nextTag()
Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached.int
nextTag(boolean currentTagRead)
if the current tag has already read, such as in the case EventReader's peek() has been called, the current cursor should not move before the loopvoid
onBeforeOctetBufferOverwrite()
Callback method that will be called before the (@link Decoder) octet buffer content is going to be changed.int
peekNext()
Peek at the next event.private void
popStack()
protected void
processAIIEncodingAlgorithm(QualifiedName name, boolean addToTable)
protected void
processAIIs()
protected void
processCIIEncodingAlgorithm(boolean addToTable)
protected void
processCommentII()
protected void
processDII()
protected void
processDIIOptionalProperties(int b)
protected void
processEII(QualifiedName name, boolean hasAttributes)
protected QualifiedName
processEIIIndexLarge(int b)
protected QualifiedName
processEIIIndexMedium(int b)
protected void
processEIIWithNamespaces(boolean hasAttributes)
protected QualifiedName
processLiteralQualifiedName(int state, QualifiedName q)
protected void
processProcessingII()
protected void
processUnexpandedEntityReference(int b)
private void
processUtf16CharacterString(int b)
private void
processUtf8CharacterString(int b)
void
require(int type, java.lang.String namespaceURI, java.lang.String localName)
Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.void
reset()
Reset the decoder for reuse decoding another XML infoset.protected void
resetOnError()
protected void
resizeNamespaceAIIs()
void
setInputStream(java.io.InputStream s)
Set the InputStream to decode the fast infoset document.void
setManager(StAXManager manager)
boolean
standaloneSet()
-
Methods inherited from class com.sun.xml.fastinfoset.Decoder
_isFastInfosetDocument, closeIfRequired, createQualifiedNameString, createQualifiedNameString, decodeAdditionalData, decodeAlphabetOctetsAsCharBuffer, decodeCharacterEncodingScheme, decodeDII, decodeEIIIndexLarge, decodeEIIIndexMedium, decodeFourBitAlphabetOctetsAsCharBuffer, decodeHeader, decodeIdentifyingNonEmptyStringIndexOnFirstBitAsNamespaceName, decodeIdentifyingNonEmptyStringIndexOnFirstBitAsPrefix, decodeIdentifyingNonEmptyStringOnFirstBit, decodeIdentifyingNonEmptyStringOnFirstBitAsNamespaceName, decodeIdentifyingNonEmptyStringOnFirstBitAsPrefix, decodeInitialVocabulary, decodeIntegerIndexOnSecondBit, decodeLiteralQualifiedName, decodeNonEmptyOctetStringLengthOnSecondBit, decodeNonEmptyOctetStringOnSecondBitAsUtf8CharArray, decodeNonEmptyOctetStringOnSecondBitAsUtf8String, decodeNonIdentifyingStringOnFirstBit, decodeNotations, decodeOctetsOnFifthBitOfNonIdentifyingStringOnFirstBit, decodeOctetsOnSeventhBitOfNonIdentifyingStringOnThirdBit, decodeRAOctetsAsString, decodeRestrictedAlphabetAsCharBuffer, decodeRestrictedAlphabetAsString, decodeUnparsedEntities, decodeUtf16StringAsCharBuffer, decodeUtf16StringAsString, decodeUtf8NCNameIntoCharBuffer, decodeUtf8StringAsCharBuffer, decodeUtf8StringAsCharBuffer, decodeUtf8StringAsString, decodeUtf8StringIntoCharBuffer, decodeUtf8StringIntoCharBuffer, decodeVersion, getBufferSize, getExternalVocabularies, getForceStreamClose, getParseFragments, getRegisteredEncodingAlgorithms, getStringInterning, isFastInfosetDocument, peek, peek, peek2, read, setBufferSize, setExternalVocabularies, setForceStreamClose, setParseFragments, setRegisteredEncodingAlgorithms, setStringInterning, setVocabulary
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
INTERNAL_STATE_START_DOCUMENT
protected static final int INTERNAL_STATE_START_DOCUMENT
- See Also:
- Constant Field Values
-
INTERNAL_STATE_START_ELEMENT_TERMINATE
protected static final int INTERNAL_STATE_START_ELEMENT_TERMINATE
- See Also:
- Constant Field Values
-
INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES
protected static final int INTERNAL_STATE_SINGLE_TERMINATE_ELEMENT_WITH_NAMESPACES
- See Also:
- Constant Field Values
-
INTERNAL_STATE_DOUBLE_TERMINATE_ELEMENT
protected static final int INTERNAL_STATE_DOUBLE_TERMINATE_ELEMENT
- See Also:
- Constant Field Values
-
INTERNAL_STATE_END_DOCUMENT
protected static final int INTERNAL_STATE_END_DOCUMENT
- See Also:
- Constant Field Values
-
INTERNAL_STATE_VOID
protected static final int INTERNAL_STATE_VOID
- See Also:
- Constant Field Values
-
_internalState
protected int _internalState
-
_eventType
protected int _eventType
Current event
-
_qNameStack
protected QualifiedName[] _qNameStack
Stack of qualified names and namespaces
-
_namespaceAIIsStartStack
protected int[] _namespaceAIIsStartStack
-
_namespaceAIIsEndStack
protected int[] _namespaceAIIsEndStack
-
_stackCount
protected int _stackCount
-
_namespaceAIIsPrefix
protected java.lang.String[] _namespaceAIIsPrefix
-
_namespaceAIIsNamespaceName
protected java.lang.String[] _namespaceAIIsNamespaceName
-
_namespaceAIIsPrefixIndex
protected int[] _namespaceAIIsPrefixIndex
-
_namespaceAIIsIndex
protected int _namespaceAIIsIndex
-
_currentNamespaceAIIsStart
protected int _currentNamespaceAIIsStart
Namespaces associated with START_ELEMENT or END_ELEMENT
-
_currentNamespaceAIIsEnd
protected int _currentNamespaceAIIsEnd
-
_qualifiedName
protected QualifiedName _qualifiedName
Qualified name associated with START_ELEMENT or END_ELEMENT.
-
_attributes
protected AttributesHolder _attributes
List of attributes
-
_clearAttributes
protected boolean _clearAttributes
-
_characters
protected char[] _characters
Characters associated with event.
-
_charactersOffset
protected int _charactersOffset
-
_algorithmURI
protected java.lang.String _algorithmURI
-
_algorithmId
protected int _algorithmId
-
_isAlgorithmDataCloned
protected boolean _isAlgorithmDataCloned
-
_algorithmData
protected byte[] _algorithmData
-
_algorithmDataOffset
protected int _algorithmDataOffset
-
_algorithmDataLength
protected int _algorithmDataLength
-
_piTarget
protected java.lang.String _piTarget
State for processing instruction
-
_piData
protected java.lang.String _piData
-
_nsContext
protected StAXDocumentParser.NamespaceContextImpl _nsContext
-
_characterEncodingScheme
protected java.lang.String _characterEncodingScheme
-
_manager
protected StAXManager _manager
-
base64TaleBytes
private byte[] base64TaleBytes
-
base64TaleLength
private int base64TaleLength
-
-
Constructor Detail
-
StAXDocumentParser
public StAXDocumentParser()
-
StAXDocumentParser
public StAXDocumentParser(java.io.InputStream s)
-
StAXDocumentParser
public StAXDocumentParser(java.io.InputStream s, StAXManager manager)
-
-
Method Detail
-
setInputStream
public void setInputStream(java.io.InputStream s)
Description copied from class:Decoder
Set the InputStream to decode the fast infoset document.- Overrides:
setInputStream
in classDecoder
- Parameters:
s
- the InputStream where the fast infoset document is decoded from.
-
reset
public void reset()
Description copied from class:Decoder
Reset the decoder for reuse decoding another XML infoset.
-
resetOnError
protected void resetOnError()
-
getProperty
public java.lang.Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException
- Specified by:
getProperty
in interfacejavax.xml.stream.XMLStreamReader
- Throws:
java.lang.IllegalArgumentException
-
next
public int next() throws javax.xml.stream.XMLStreamException
- Specified by:
next
in interfacejavax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
-
processUtf8CharacterString
private final void processUtf8CharacterString(int b) throws java.io.IOException
- Throws:
java.io.IOException
-
processUtf16CharacterString
private final void processUtf16CharacterString(int b) throws java.io.IOException
- Throws:
java.io.IOException
-
popStack
private void popStack()
-
require
public final void require(int type, java.lang.String namespaceURI, java.lang.String localName) throws javax.xml.stream.XMLStreamException
Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality.- Specified by:
require
in interfacejavax.xml.stream.XMLStreamReader
- Parameters:
type
- the event typenamespaceURI
- the uri of the event, may be nulllocalName
- the localName of the event, may be null- Throws:
javax.xml.stream.XMLStreamException
- if the required values are not matched.
-
getElementText
public final java.lang.String getElementText() throws javax.xml.stream.XMLStreamException
Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.- Specified by:
getElementText
in interfacejavax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
- if the current event is not a START_ELEMENT or if a non text element is encountered
-
getElementText
public final java.lang.String getElementText(boolean startElementRead) throws javax.xml.stream.XMLStreamException
- Parameters:
startElementRead
- flag if start element has already been read- Throws:
javax.xml.stream.XMLStreamException
-
nextTag
public final int nextTag() throws javax.xml.stream.XMLStreamException
Skips any white space (isWhiteSpace() returns true), COMMENT, or PROCESSING_INSTRUCTION, until a START_ELEMENT or END_ELEMENT is reached. If other than white space characters, COMMENT, PROCESSING_INSTRUCTION, START_ELEMENT, END_ELEMENT are encountered, an exception is thrown. This method should be used when processing element-only content seperated by white space. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if then DTD is missing or not interpreted.- Specified by:
nextTag
in interfacejavax.xml.stream.XMLStreamReader
- Returns:
- the event type of the element read
- Throws:
javax.xml.stream.XMLStreamException
- if the current event is not white space
-
nextTag
public final int nextTag(boolean currentTagRead) throws javax.xml.stream.XMLStreamException
if the current tag has already read, such as in the case EventReader's peek() has been called, the current cursor should not move before the loop- Throws:
javax.xml.stream.XMLStreamException
-
hasNext
public final boolean hasNext() throws javax.xml.stream.XMLStreamException
- Specified by:
hasNext
in interfacejavax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
-
close
public void close() throws javax.xml.stream.XMLStreamException
- Specified by:
close
in interfacejavax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
-
getNamespaceURI
public final java.lang.String getNamespaceURI(java.lang.String prefix)
- Specified by:
getNamespaceURI
in interfacejavax.xml.stream.XMLStreamReader
-
isStartElement
public final boolean isStartElement()
- Specified by:
isStartElement
in interfacejavax.xml.stream.XMLStreamReader
-
isEndElement
public final boolean isEndElement()
- Specified by:
isEndElement
in interfacejavax.xml.stream.XMLStreamReader
-
isCharacters
public final boolean isCharacters()
- Specified by:
isCharacters
in interfacejavax.xml.stream.XMLStreamReader
-
isWhiteSpace
public final boolean isWhiteSpace()
Returns true if the cursor points to a character data event that consists of all whitespace Application calling this method needs to cache the value and avoid calling this method again for the same event.- Specified by:
isWhiteSpace
in interfacejavax.xml.stream.XMLStreamReader
- Returns:
- true if the cursor points to all whitespace, false otherwise
-
getAttributeValue
public final java.lang.String getAttributeValue(java.lang.String namespaceURI, java.lang.String localName)
- Specified by:
getAttributeValue
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributeCount
public final int getAttributeCount()
- Specified by:
getAttributeCount
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributeName
public final javax.xml.namespace.QName getAttributeName(int index)
- Specified by:
getAttributeName
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributeNamespace
public final java.lang.String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespace
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributeLocalName
public final java.lang.String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalName
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributePrefix
public final java.lang.String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributeType
public final java.lang.String getAttributeType(int index)
- Specified by:
getAttributeType
in interfacejavax.xml.stream.XMLStreamReader
-
getAttributeValue
public final java.lang.String getAttributeValue(int index)
- Specified by:
getAttributeValue
in interfacejavax.xml.stream.XMLStreamReader
-
isAttributeSpecified
public final boolean isAttributeSpecified(int index)
- Specified by:
isAttributeSpecified
in interfacejavax.xml.stream.XMLStreamReader
-
getNamespaceCount
public final int getNamespaceCount()
- Specified by:
getNamespaceCount
in interfacejavax.xml.stream.XMLStreamReader
-
getNamespacePrefix
public final java.lang.String getNamespacePrefix(int index)
- Specified by:
getNamespacePrefix
in interfacejavax.xml.stream.XMLStreamReader
-
getNamespaceURI
public final java.lang.String getNamespaceURI(int index)
- Specified by:
getNamespaceURI
in interfacejavax.xml.stream.XMLStreamReader
-
getNamespaceContext
public final javax.xml.namespace.NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContext
in interfacejavax.xml.stream.XMLStreamReader
-
getEventType
public final int getEventType()
- Specified by:
getEventType
in interfacejavax.xml.stream.XMLStreamReader
-
getText
public final java.lang.String getText()
- Specified by:
getText
in interfacejavax.xml.stream.XMLStreamReader
-
getTextCharacters
public final char[] getTextCharacters()
- Specified by:
getTextCharacters
in interfacejavax.xml.stream.XMLStreamReader
-
getTextStart
public final int getTextStart()
- Specified by:
getTextStart
in interfacejavax.xml.stream.XMLStreamReader
-
getTextLength
public final int getTextLength()
- Specified by:
getTextLength
in interfacejavax.xml.stream.XMLStreamReader
-
getTextCharacters
public final int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws javax.xml.stream.XMLStreamException
- Specified by:
getTextCharacters
in interfacejavax.xml.stream.XMLStreamReader
- Throws:
javax.xml.stream.XMLStreamException
-
checkTextState
protected final void checkTextState()
-
getEncoding
public final java.lang.String getEncoding()
- Specified by:
getEncoding
in interfacejavax.xml.stream.XMLStreamReader
-
hasText
public final boolean hasText()
- Specified by:
hasText
in interfacejavax.xml.stream.XMLStreamReader
-
getLocation
public final javax.xml.stream.Location getLocation()
- Specified by:
getLocation
in interfacejavax.xml.stream.XMLStreamReader
-
getName
public final javax.xml.namespace.QName getName()
- Specified by:
getName
in interfacejavax.xml.stream.XMLStreamReader
-
getLocalName
public final java.lang.String getLocalName()
- Specified by:
getLocalName
in interfacejavax.xml.stream.XMLStreamReader
-
hasName
public final boolean hasName()
- Specified by:
hasName
in interfacejavax.xml.stream.XMLStreamReader
-
getNamespaceURI
public final java.lang.String getNamespaceURI()
- Specified by:
getNamespaceURI
in interfacejavax.xml.stream.XMLStreamReader
-
getPrefix
public final java.lang.String getPrefix()
- Specified by:
getPrefix
in interfacejavax.xml.stream.XMLStreamReader
-
getVersion
public final java.lang.String getVersion()
- Specified by:
getVersion
in interfacejavax.xml.stream.XMLStreamReader
-
isStandalone
public final boolean isStandalone()
- Specified by:
isStandalone
in interfacejavax.xml.stream.XMLStreamReader
-
standaloneSet
public final boolean standaloneSet()
- Specified by:
standaloneSet
in interfacejavax.xml.stream.XMLStreamReader
-
getCharacterEncodingScheme
public final java.lang.String getCharacterEncodingScheme()
- Specified by:
getCharacterEncodingScheme
in interfacejavax.xml.stream.XMLStreamReader
-
getPITarget
public final java.lang.String getPITarget()
- Specified by:
getPITarget
in interfacejavax.xml.stream.XMLStreamReader
-
getPIData
public final java.lang.String getPIData()
- Specified by:
getPIData
in interfacejavax.xml.stream.XMLStreamReader
-
getNameString
public final java.lang.String getNameString()
-
getAttributeNameString
public final java.lang.String getAttributeNameString(int index)
-
getTextAlgorithmURI
public final java.lang.String getTextAlgorithmURI()
-
getTextAlgorithmIndex
public final int getTextAlgorithmIndex()
-
hasTextAlgorithmBytes
public final boolean hasTextAlgorithmBytes()
-
getTextAlgorithmBytes
public final byte[] getTextAlgorithmBytes()
Deprecated.was deprecated due to security reasons. Now the method return cloned byte[].Returns the byte[], which represents text algorithms.- Returns:
-
getTextAlgorithmBytesClone
public final byte[] getTextAlgorithmBytesClone()
-
getTextAlgorithmStart
public final int getTextAlgorithmStart()
-
getTextAlgorithmLength
public final int getTextAlgorithmLength()
-
getTextAlgorithmBytes
public final int getTextAlgorithmBytes(int sourceStart, byte[] target, int targetStart, int length) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
peekNext
public final int peekNext() throws javax.xml.stream.XMLStreamException
Description copied from interface:FastInfosetStreamReader
Peek at the next event.- Specified by:
peekNext
in interfaceFastInfosetStreamReader
- Returns:
- the event, which will be the same as that returned from
#next
. - Throws:
javax.xml.stream.XMLStreamException
-
onBeforeOctetBufferOverwrite
public void onBeforeOctetBufferOverwrite()
Description copied from interface:OctetBufferListener
Callback method that will be called before the (@link Decoder) octet buffer content is going to be changed. So it will be possible to preserve a read data by cloning, or perform other actions.- Specified by:
onBeforeOctetBufferOverwrite
in interfaceOctetBufferListener
-
accessNamespaceCount
public final int accessNamespaceCount()
- Specified by:
accessNamespaceCount
in interfaceFastInfosetStreamReader
-
accessLocalName
public final java.lang.String accessLocalName()
- Specified by:
accessLocalName
in interfaceFastInfosetStreamReader
-
accessNamespaceURI
public final java.lang.String accessNamespaceURI()
- Specified by:
accessNamespaceURI
in interfaceFastInfosetStreamReader
-
accessPrefix
public final java.lang.String accessPrefix()
- Specified by:
accessPrefix
in interfaceFastInfosetStreamReader
-
accessTextCharacters
public final char[] accessTextCharacters()
Description copied from interface:FastInfosetStreamReader
Returns a cloned char[] representation of the internal char[] buffer. So be careful, when using this method due to possible performance and memory inefficiency.- Specified by:
accessTextCharacters
in interfaceFastInfosetStreamReader
- Returns:
- a cloned char[] representation of the internal char[] buffer.
-
accessTextStart
public final int accessTextStart()
- Specified by:
accessTextStart
in interfaceFastInfosetStreamReader
-
accessTextLength
public final int accessTextLength()
- Specified by:
accessTextLength
in interfaceFastInfosetStreamReader
-
processDII
protected final void processDII() throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processDIIOptionalProperties
protected final void processDIIOptionalProperties(int b) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
resizeNamespaceAIIs
protected final void resizeNamespaceAIIs()
-
processEIIWithNamespaces
protected final void processEIIWithNamespaces(boolean hasAttributes) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processEII
protected final void processEII(QualifiedName name, boolean hasAttributes) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processAIIs
protected final void processAIIs() throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processEIIIndexMedium
protected final QualifiedName processEIIIndexMedium(int b) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processEIIIndexLarge
protected final QualifiedName processEIIIndexLarge(int b) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processLiteralQualifiedName
protected final QualifiedName processLiteralQualifiedName(int state, QualifiedName q) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processCommentII
protected final void processCommentII() throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processProcessingII
protected final void processProcessingII() throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processUnexpandedEntityReference
protected final void processUnexpandedEntityReference(int b) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processCIIEncodingAlgorithm
protected final void processCIIEncodingAlgorithm(boolean addToTable) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
processAIIEncodingAlgorithm
protected final void processAIIEncodingAlgorithm(QualifiedName name, boolean addToTable) throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
convertEncodingAlgorithmDataToCharacters
protected final void convertEncodingAlgorithmDataToCharacters() throws FastInfosetException, java.io.IOException
- Throws:
FastInfosetException
java.io.IOException
-
convertBase64AlorithmDataToCharacters
protected void convertBase64AlorithmDataToCharacters(java.lang.StringBuffer buffer) throws EncodingAlgorithmException, java.io.IOException
- Throws:
EncodingAlgorithmException
java.io.IOException
-
base64DecodeWithCloning
private void base64DecodeWithCloning(java.lang.StringBuffer dstBuffer, byte[] data, int offset, int length) throws EncodingAlgorithmException
- Throws:
EncodingAlgorithmException
-
base64DecodeWithoutCloning
private void base64DecodeWithoutCloning(java.lang.StringBuffer dstBuffer, byte[] data, int offset, int length) throws EncodingAlgorithmException
- Throws:
EncodingAlgorithmException
-
isBase64Follows
public boolean isBase64Follows() throws java.io.IOException
- Throws:
java.io.IOException
-
getNamespaceDecl
public final java.lang.String getNamespaceDecl(java.lang.String prefix)
-
getURI
public final java.lang.String getURI(java.lang.String prefix)
-
getPrefixes
public final java.util.Iterator getPrefixes()
-
getAttributesHolder
public final AttributesHolder getAttributesHolder()
-
setManager
public final void setManager(StAXManager manager)
-
getEventTypeString
static final java.lang.String getEventTypeString(int eventType)
-
-