public void write(String str,int off,int len){
  int newcount=count + len;
  if (newcount > buf.length) {
    expandCapacity(newcount);
  }
  str.getChars(off,off + len,buf,count);
  count=newcount;
}

public void write ( String str , int off , int len ) { int newcount = count + len ; if ( newcount > buf . length ) { expandCapacity ( newcount ) ; } str . getChars ( off , off + len , buf , count ) ; count = newcount ; }
write a portion of a string to the buffer .
