public char[] toCharArray(final int startIndex,int endIndex){
  endIndex=validateRange(startIndex,endIndex);
  final int len=endIndex - startIndex;
  if (len == 0) {
    return ArrayUtils.EMPTY_CHAR_ARRAY;
  }
  final char chars[]=new char[len];
  System.arraycopy(buffer,startIndex,chars,0,len);
  return chars;
}

public char [ ] toCharArray ( final int startIndex , int endIndex ) { endIndex = validateRange ( startIndex , endIndex ) ; final int len = endIndex - startIndex ; if ( len == 0 ) { return ArrayUtils . EMPTY_CHAR_ARRAY ; } final char chars [ ] = new char [ len ] ; System . arraycopy ( buffer , startIndex , chars , 0 , len ) ; return chars ; }
copies part of the builder ' s character array into a new character array .
