Esempio 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;
   }
 }
Esempio n. 2
0
 private void addToCharBuff(final String s) {
   final int size = s.length();
   ensureCharBuffRemaining(size);
   charBuff.put(s);
 }
Esempio n. 3
0
 private void addToCharBuff(final char c) {
   ensureCharBuffRemaining(1);
   charBuff.put(c);
 }
Esempio n. 4
0
 private void updateWith(final char[] chArr, final int ofst, final int len) {
   ensureCharBuffRemaining(len);
   charBuff.put(chArr, ofst, len);
   updateWithCharBuf();
 }