public void write(char c[],int off,int len){
  if (off < 0 || off > c.length || len < 0 || off + len > c.length || off + len < 0) {
    throw new IndexOutOfBoundsException();
  }
 else   if (len == 0) {
    return;
  }
  int newcount=count + len;
  if (newcount > buf.length) {
    expandCapacity(newcount);
  }
  System.arraycopy(c,off,buf,count,len);
  count=newcount;
}

public void write ( char c [ ] , int off , int len ) { if ( off < 0 || off > c . length || len < 0 || off + len > c . length || off + len < 0 ) { throw new IndexOutOfBoundsException ( ) ; } else if ( len == 0 ) { return ; } int newcount = count + len ; if ( newcount > buf . length ) { expandCapacity ( newcount ) ; } System . arraycopy ( c , off , buf , count , len ) ; count = newcount ; }
writes characters to the buffer .
