protected final void storeContentObject(Object s) { _contentObjects[_contentObjectsPtr++] = s; if (_contentObjectsPtr == _contentObjects.length) { resizeContentObjects(); } }
protected final void storeStructure(int b) { _structure[_structurePtr++] = (byte)b; if (_structurePtr == _structure.length) { resizeStructure(); } }
protected final void storeStructureString(String s) { _structureStrings[_structureStringsPtr++] = s; if (_structureStringsPtr == _structureStrings.length) { resizeStructureStrings(); } }
protected final void storeContentCharacters(int type, char[] ch, int start, int length) { if (_contentCharactersBufferPtr + length >= _contentCharactersBuffer.length) { if (length >= 512) { storeStructure(type | CONTENT_TYPE_CHAR_ARRAY_COPY); storeContentCharactersCopy(ch, start, length); return; } resizeContentCharacters(); } if (length < CHAR_ARRAY_LENGTH_SMALL_SIZE) { storeStructure(type); storeStructure(length); System.arraycopy(ch, start, _contentCharactersBuffer, _contentCharactersBufferPtr, length); _contentCharactersBufferPtr += length; } else if (length < CHAR_ARRAY_LENGTH_MEDIUM_SIZE) { storeStructure(type | CHAR_ARRAY_LENGTH_MEDIUM); storeStructure(length >> 8); storeStructure(length & 255); System.arraycopy(ch, start, _contentCharactersBuffer, _contentCharactersBufferPtr, length); _contentCharactersBufferPtr += length; } else { storeStructure(type | CONTENT_TYPE_CHAR_ARRAY_COPY); storeContentCharactersCopy(ch, start, length); } }
protected final void storeContentString(String s) { storeContentObject(s); }
public void setXMLStreamBuffer(MutableXMLStreamBuffer buffer) { if (buffer == null) { throw new NullPointerException("buffer cannot be null"); } setBuffer(buffer); }
protected final void storeContentCharactersCopy(char[] ch, int start, int length) { char[] copyOfCh = new char[length]; System.arraycopy(ch, start, copyOfCh, 0, length); storeContentObject(copyOfCh); }
protected final void createBuffer() { setBuffer(new MutableXMLStreamBuffer()); }