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 .