private void addToTable(String s, CharArrayArray a) { if (s.length() == 0) { return; } char[] c = s.toCharArray(); a.add(new CharArray(c, 0, c.length, false)); }
public final CharArray get(int i) { if (_readOnlyArray == null) { return _array[i]; } else { if (i < _readOnlyArraySize) { return _readOnlyArray.get(i); } else { return _array[i - _readOnlyArraySize]; } } }
protected final void processCommentII() throws FastInfosetException, IOException { switch(decodeNonIdentifyingStringOnFirstBit()) { case NISTRING_STRING: { final String s = new String(_charBuffer, 0, _charBufferLength); if (_addToTable) { _v.otherString.add(new CharArrayString(s, false)); } _currentNode.appendChild(_document.createComment(s)); break; } case NISTRING_ENCODING_ALGORITHM: throw new IOException(CommonResourceBundle.getInstance().getString("message.commentIIAlgorithmNotSupported")); case NISTRING_INDEX: { final String s = _v.otherString.get(_integer).toString(); _currentNode.appendChild(_document.createComment(s)); break; } case NISTRING_EMPTY_STRING: _currentNode.appendChild(_document.createComment("")); break; } }
public final void add(CharArray s) { if (_size == _array.length) { resize(); } _array[_size++] = s; }
public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) { if (!(readOnlyArray instanceof CharArrayArray)) { throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.illegalClass", new Object[]{readOnlyArray})); } setReadOnlyArray((CharArrayArray)readOnlyArray, clear); }
/** Creates a new instance of ParserVocabulary */ public ParserVocabulary() { namespaceName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false); prefix = new PrefixArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); localName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false); otherNCName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false); otherURI = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true); attributeValue = new StringArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true); otherString = new CharArrayArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); characterContentChunk = new ContiguousCharArrayArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, ContiguousCharArrayArray.INITIAL_CHARACTER_SIZE, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS); elementName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); attributeName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); tables[RESTRICTED_ALPHABET] = restrictedAlphabet; tables[ENCODING_ALGORITHM] = encodingAlgorithm; tables[PREFIX] = prefix; tables[NAMESPACE_NAME] = namespaceName; tables[LOCAL_NAME] = localName; tables[OTHER_NCNAME] = otherNCName; tables[OTHER_URI] = otherURI; tables[ATTRIBUTE_VALUE] = attributeValue; tables[OTHER_STRING] = otherString; tables[CHARACTER_CONTENT_CHUNK] = characterContentChunk; tables[ELEMENT_NAME] = elementName; tables[ATTRIBUTE_NAME] = attributeName; }
protected final void processCommentII() throws FastInfosetException, IOException { switch(decodeNonIdentifyingStringOnFirstBit()) { case NISTRING_STRING: { final String s = new String(_charBuffer, 0, _charBufferLength); if (_addToTable) { _v.otherString.add(new CharArrayString(s, false)); } _currentNode.appendChild(_document.createComment(s)); break; } case NISTRING_ENCODING_ALGORITHM: throw new IOException(CommonResourceBundle.getInstance().getString("message.commentIIAlgorithmNotSupported")); case NISTRING_INDEX: { final String s = _v.otherString.get(_integer).toString(); _currentNode.appendChild(_document.createComment(s)); break; } case NISTRING_EMPTY_STRING: _currentNode.appendChild(_document.createComment("")); break; } }
public final void add(CharArray s) { if (_size == _array.length) { resize(); } _array[_size++] = s; }
public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) { if (!(readOnlyArray instanceof CharArrayArray)) { throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.illegalClass", new Object[]{readOnlyArray})); } setReadOnlyArray((CharArrayArray)readOnlyArray, clear); }
/** Creates a new instance of ParserVocabulary */ public ParserVocabulary() { namespaceName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false); prefix = new PrefixArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); localName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false); otherNCName = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, false); otherURI = new StringArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true); attributeValue = new StringArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, true); otherString = new CharArrayArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); characterContentChunk = new ContiguousCharArrayArray(ValueArray.DEFAULT_CAPACITY, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS, ContiguousCharArrayArray.INITIAL_CHARACTER_SIZE, NON_IDENTIFYING_STRING_TABLE_MAXIMUM_CHARACTERS); elementName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); attributeName = new QualifiedNameArray(ValueArray.DEFAULT_CAPACITY, IDENTIFYING_STRING_TABLE_MAXIMUM_ITEMS); tables[RESTRICTED_ALPHABET] = restrictedAlphabet; tables[ENCODING_ALGORITHM] = encodingAlgorithm; tables[PREFIX] = prefix; tables[NAMESPACE_NAME] = namespaceName; tables[LOCAL_NAME] = localName; tables[OTHER_NCNAME] = otherNCName; tables[OTHER_URI] = otherURI; tables[ATTRIBUTE_VALUE] = attributeValue; tables[OTHER_STRING] = otherString; tables[CHARACTER_CONTENT_CHUNK] = characterContentChunk; tables[ELEMENT_NAME] = elementName; tables[ATTRIBUTE_NAME] = attributeName; }
protected final void processCommentII() throws FastInfosetException, IOException { switch(decodeNonIdentifyingStringOnFirstBit()) { case NISTRING_STRING: { final String s = new String(_charBuffer, 0, _charBufferLength); if (_addToTable) { _v.otherString.add(new CharArrayString(s, false)); } _currentNode.appendChild(_document.createComment(s)); break; } case NISTRING_ENCODING_ALGORITHM: throw new IOException(CommonResourceBundle.getInstance().getString("message.commentIIAlgorithmNotSupported")); case NISTRING_INDEX: { final String s = _v.otherString.get(_integer).toString(); _currentNode.appendChild(_document.createComment(s)); break; } case NISTRING_EMPTY_STRING: _currentNode.appendChild(_document.createComment("")); break; } }
private void addToTable(String s, CharArrayArray a) { if (s.length() == 0) { return; } char[] c = s.toCharArray(); a.add(new CharArray(c, 0, c.length, false)); }
public final CharArray get(int i) { if (_readOnlyArray == null) { return _array[i]; } else { if (i < _readOnlyArraySize) { return _readOnlyArray.get(i); } else { return _array[i - _readOnlyArraySize]; } } }
public final void add(CharArray s) { if (_size == _array.length) { resize(); } _array[_size++] = s; }
public final void setReadOnlyArray(ValueArray readOnlyArray, boolean clear) { if (!(readOnlyArray instanceof CharArrayArray)) { throw new IllegalArgumentException(CommonResourceBundle.getInstance().getString("message.illegalClass", new Object[]{readOnlyArray})); } setReadOnlyArray((CharArrayArray)readOnlyArray, clear); }