Exemplo n.º 1
0
 private void ensureCharBuffRemaining(final int size) {
   if (charBuff.remaining() < size) {
     final int cpcty = (charBuff.capacity() + size) * 2;
     final java.nio.CharBuffer newChBuf = java.nio.CharBuffer.allocate(cpcty);
     newChBuf.put(charBuff);
     charBuff = newChBuf;
   }
 }
Exemplo n.º 2
0
 private void addToCharBuff(final String s) {
   final int size = s.length();
   ensureCharBuffRemaining(size);
   charBuff.put(s);
 }
Exemplo n.º 3
0
 private void addToCharBuff(final char c) {
   ensureCharBuffRemaining(1);
   charBuff.put(c);
 }
Exemplo n.º 4
0
 private void updateWith(final char[] chArr, final int ofst, final int len) {
   ensureCharBuffRemaining(len);
   charBuff.put(chArr, ofst, len);
   updateWithCharBuf();
 }