| Modifier and Type | Field and Description |
|---|---|
| private String | _allAttrValues
Concatenated String that contains all the attribute values for the element. |
| private int | _attrCount
Number of attributes currently held by this collector. |
| protected int[] | _attrMap
Int-based compact data structure that contains mapping from attribute names to attribute indexes in the main attribute name array. |
| pack-priv final ReaderConfig | |
| private String | _errorMsg
For some errors, we'll have to temporarily store error message, to be thrown at a later point. |
| protected int | _hashAreaSize
Size of hash area in |
| private PName[] | |
| private boolean | _needToResetValues
Flag used to indicate that all attribute values for an element
have been parsed, and that next call to |
| protected int | _spillAreaEnd
Pointer to int slot right after last spill entry, in
|
| private char[] | _valueBuffer
Consequtive character array, in which attribute values are concatenated in |
| private int[] | _valueOffsets
Array that contains ending offsets of the values in the shared buffer. |
| private static final int | DEFAULT_BUFFER_LENGTH
The default length of the value buffer is also chosen more to minimize overhead than to eliminate all need for resizing. |
| private static final int | DEFAULT_ENTRY_COUNT
Let's guess that most of the time there won't be more than 12 attributes. |
| private static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private final boolean | checkExpand(TypedArrayDecoder tad)
Internal method used to see if we can expand the buffer that the array decoder has. |
| public char[] | |
| public byte[] | |
| public final void | |
| public final int | |
| private final int | decodeValues(TypedArrayDecoder dec, final char[] buf, int ptr, final int end, final XmlScanner scanner)
|
| public int | |
| public final int | Returns: Number of attributes collectedMethod called after all attribute entries have been parsed, and thus the end of the last value in the buffer is known. |
| public final int | |
| public final int | |
| public String | |
| public final PName | |
| public final QName | |
| public String | |
| public String | |
| private static final boolean | |
| private void | |
| public char[] | Returns: Underlying character buffer to use for storing attribute value charactersMethod called by the parser right after attribute name has been parsed, but before value has been parsed. |
| public char[] |
| _allAttrValues | back to summary |
|---|---|
| private String _allAttrValues Concatenated String that contains all the attribute values for the element. Allows some buffer reuse, and should result in slight speed optimization, for elements with lots of attributes that are usually all (or none) accessed. | |
| _attrCount | back to summary |
|---|---|
| private int _attrCount Number of attributes currently held by this collector. | |
| _attrMap | back to summary |
|---|---|
| protected int[] _attrMap Int-based compact data structure that contains mapping from attribute names to attribute indexes in the main attribute name array.
Data structure contains two separate areas; main hash area (with
size | |
| _config | back to summary |
|---|---|
| pack-priv final ReaderConfig _config | |
| _errorMsg | back to summary |
|---|---|
| private String _errorMsg For some errors, we'll have to temporarily store error message, to be thrown at a later point. | |
| _hashAreaSize | back to summary |
|---|---|
| protected int _hashAreaSize Size of hash area in | |
| _names | back to summary |
|---|---|
| private PName[] _names | |
| _needToResetValues | back to summary |
|---|---|
| private boolean _needToResetValues Flag used to indicate that all attribute values for an element
have been parsed, and that next call to | |
| _spillAreaEnd | back to summary |
|---|---|
| protected int _spillAreaEnd Pointer to int slot right after last spill entry, in
| |
| _valueBuffer | back to summary |
|---|---|
| private char[] _valueBuffer Consequtive character array, in which attribute values are concatenated in | |
| _valueOffsets | back to summary |
|---|---|
| private int[] _valueOffsets Array that contains ending offsets of the values in the shared buffer. Entries contain character offset after the end of the matching offset; so entry 0 for example contains starting offset of the entry 1. | |
| DEFAULT_BUFFER_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_BUFFER_LENGTH The default length of the value buffer is also chosen more to minimize overhead than to eliminate all need for resizing. | |
| DEFAULT_ENTRY_COUNT | back to summary |
|---|---|
| private static final int DEFAULT_ENTRY_COUNT Let's guess that most of the time there won't be more than 12 attributes. Since the underlying buffer will be expanded as necessary, exact value is chosen to minimize overhead rather than eliminate any resizing. | |
| INT_SPACE | back to summary |
|---|---|
| private static final int INT_SPACE | |
| AttributeCollector | back to summary |
|---|---|
| protected AttributeCollector(ReaderConfig cfg) | |
| checkExpand | back to summary |
|---|---|
| private final boolean checkExpand(TypedArrayDecoder tad) Internal method used to see if we can expand the buffer that the array decoder has. Bit messy, but simpler than having separately typed instances; and called rarely so that performance downside of instanceof is irrelevant. | |
| continueValue | back to summary |
|---|---|
| public char[] continueValue() | |
| decodeBinaryValue | back to summary |
|---|---|
| public byte[] decodeBinaryValue(int index, Base64Variant v, CharArrayBase64Decoder dec, XmlScanner scanner) throws XMLStreamException | |
| decodeValue | back to summary |
|---|---|
| public final void decodeValue(int index, TypedValueDecoder dec) throws IllegalArgumentException | |
| decodeValues | back to summary |
|---|---|
| public final int decodeValues(int index, TypedArrayDecoder dec, XmlScanner scanner) throws XMLStreamException | |
| decodeValues | back to summary |
|---|---|
| private final int decodeValues(TypedArrayDecoder dec, final char[] buf, int ptr, final int end, final XmlScanner scanner) throws XMLStreamException | |
| findIndex | back to summary |
|---|---|
| public int findIndex(String nsUri, String localName) | |
| finishLastValue | back to summary |
|---|---|
| public final 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.
| |
| finishLastValue2 | back to summary |
|---|---|
| public final int finishLastValue2() | |
| getCount | back to summary |
|---|---|
| public final int getCount() | |
| getErrorMsg | back to summary |
|---|---|
| public String getErrorMsg() | |
| getName | back to summary |
|---|---|
| public final PName getName(int index) | |
| getQName | back to summary |
|---|---|
| public final QName getQName(int index) | |
| getValue | back to summary |
|---|---|
| public String getValue(int index) | |
| getValue | back to summary |
|---|---|
| public String getValue(String nsUri, String localName) | |
| isSpace | back to summary |
|---|---|
| private static final boolean isSpace(char c) | |
| noteDupAttr | back to summary |
|---|---|
| private void noteDupAttr(int ix1, int ix2) | |
| startNewValue | back to summary |
|---|---|
| public char[] startNewValue(PName attrName, int currOffset) Method called by the parser right after attribute name has been parsed, but before value has been parsed.
| |
| valueBufferFull | back to summary |
|---|---|
| public char[] valueBufferFull() Method called by the owner, when the | |