private void appendToBuf(char[] ch,int start,int end){
  if (start == end) {
    return;
  }
  int neededBufLen=pos + (end - start);
  if (neededBufLen > buf.length) {
    char[] newBuf=new char[neededBufLen];
    System.arraycopy(buf,0,newBuf,0,pos);
    if (bufHolder == null) {
      bufHolder=buf;
    }
    buf=newBuf;
  }
  System.arraycopy(ch,start,buf,pos,end - start);
  pos+=(end - start);
}

private void appendToBuf ( char [ ] ch , int start , int end ) { if ( start == end ) { return ; } int neededBufLen = pos + ( end - start ) ; if ( neededBufLen > buf . length ) { char [ ] newBuf = new char [ neededBufLen ] ; System . arraycopy ( buf , 0 , newBuf , 0 , pos ) ; if ( bufHolder == null ) { bufHolder = buf ; } buf = newBuf ; } System . arraycopy ( ch , start , buf , pos , end - start ) ; pos += ( end - start ) ; }
appends a slice of an utf - 16 code unit array to the internal buffer .
