|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.aalto.in.AttributeCollector
public final class AttributeCollector
Object used by the tokenizer to collect and store information about attributes, specifically, names and values.
Field Summary | |
---|---|
protected int[] |
_attrMap
Int-based compact data structure that contains mapping from attribute names to attribute indexes in the main attribute name array. |
protected int |
_hashAreaSize
Size of hash area in _attrMap ; generally at least 20%
more than number of attributes (_attrCount ). |
protected int |
_spillAreaEnd
Pointer to int slot right after last spill entry, in _attrMap array. |
Constructor Summary | |
---|---|
protected |
AttributeCollector(ReaderConfig cfg)
|
Method Summary | |
---|---|
char[] |
continueValue()
|
byte[] |
decodeBinaryValue(int index,
org.codehaus.stax2.typed.Base64Variant v,
org.codehaus.stax2.ri.typed.CharArrayBase64Decoder dec,
XmlScanner scanner)
|
void |
decodeValue(int index,
org.codehaus.stax2.typed.TypedValueDecoder dec)
|
int |
decodeValues(int index,
org.codehaus.stax2.typed.TypedArrayDecoder dec,
XmlScanner scanner)
|
int |
findIndex(String nsUri,
String localName)
|
int |
finishLastValue(int endingOffset)
Method called after all attribute entries have been parsed, and thus the end of the last value in the buffer is known. |
int |
finishLastValue2()
|
int |
getCount()
|
String |
getErrorMsg()
|
PName |
getName(int index)
|
QName |
getQName(int index)
|
String |
getValue(int index)
|
String |
getValue(String nsUri,
String localName)
|
char[] |
startNewValue(PName attrName,
int currOffset)
Method called by the parser right after attribute name has been parsed, but before value has been parsed. |
char[] |
valueBufferFull()
Method called by the owner, when the |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int[] _attrMap
Data structure contains two separate areas; main hash area (with
size _hashAreaSize
), and remaining spillover area
that follows hash area up until (but not including)
_spillAreaEnd
index.
Main hash area only contains indexes (index+1; 0 signifying empty slot)
to actual attributes; spillover area has both hash and index for
any spilled entry. Spilled entries are simply stored in order
added, and need to be searched using linear search. In case of both
primary hash hits and spills, eventual comparison with the local
name needs to be done with actual name array.
protected int _hashAreaSize
_attrMap
; generally at least 20%
more than number of attributes (_attrCount
).
protected int _spillAreaEnd
_attrMap
array.
Constructor Detail |
---|
protected AttributeCollector(ReaderConfig cfg)
Method Detail |
---|
public char[] startNewValue(PName attrName, int currOffset)
public char[] continueValue()
public final int finishLastValue(int endingOffset)
public final int finishLastValue2()
public char[] valueBufferFull()
public final int getCount()
public final PName getName(int index)
public final QName getQName(int index)
public String getValue(int index)
public String getValue(String nsUri, String localName)
public int findIndex(String nsUri, String localName)
public String getErrorMsg()
public final void decodeValue(int index, org.codehaus.stax2.typed.TypedValueDecoder dec) throws IllegalArgumentException
IllegalArgumentException
public final int decodeValues(int index, org.codehaus.stax2.typed.TypedArrayDecoder dec, XmlScanner scanner) throws XMLStreamException
XMLStreamException
public byte[] decodeBinaryValue(int index, org.codehaus.stax2.typed.Base64Variant v, org.codehaus.stax2.ri.typed.CharArrayBase64Decoder dec, XmlScanner scanner) throws XMLStreamException
XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |