Example #1
0
 // Increases statck.
 private void increaseStack() {
   CharArray[] tmp = new CharArray[_elemStack.length * 2];
   javolution.context.LogContext.info(
       new CharArray("XMLStreamReaderImpl: CharArray stack increased to " + tmp.length));
   System.arraycopy(_elemStack, 0, tmp, 0, _elemStack.length);
   _elemStack = tmp;
 }
Example #2
0
 public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
     throws XMLStreamException {
   CharArray text = getText();
   int copyLength = Math.min(length, text.length());
   System.arraycopy(text.array(), sourceStart + text.offset(), target, targetStart, copyLength);
   return copyLength;
 }
Example #3
0
 public void run() {
   if (_seqsCapacity >= _seqs.length) { // Resizes.
     CharArray[] tmp = new CharArray[_seqs.length * 2];
     System.arraycopy(_seqs, 0, tmp, 0, _seqs.length);
     _seqs = tmp;
   }
   CharArray seq = new CharArray();
   _seqs[_seqsCapacity++] = seq;
 }
Example #4
0
 // Increases internal data buffer capacity.
 private void increaseDataBuffer() {
   // Note: The character data at any nesting level is discarded
   //       only when moving to outer nesting level (due to coalescing).
   //       This accumulation may cause resize of the data buffer if
   //       numerous elements at the same nesting level are separated by
   //       spaces or indentation.
   char[] tmp = new char[_data.length * 2];
   javolution.context.LogContext.info(
       new CharArray("XMLStreamReaderImpl: Data buffer increased to " + tmp.length));
   System.arraycopy(_data, 0, tmp, 0, _data.length);
   _data = tmp;
 }