private static final char[] growBuffer(char[] dest,int index,int size){
  char[] copy=new char[size];
  if (index > 0) {
    System.arraycopy(dest,0,copy,0,index);
  }
  return copy;
}

private static final char [ ] growBuffer ( char [ ] dest , int index , int size ) { char [ ] copy = new char [ size ] ; if ( index > 0 ) { System . arraycopy ( dest , 0 , copy , 0 , index ) ; } return copy ; }
helper method to grow the character buffer as needed , this only happens once in a while so it ' s ok if it ' s in a method call . if the index passed in is 0 then no copying will be done .
