public char[] getChars(char[] destination) {
        final int len = length();
        if (destination == null || destination.length < len) {
            destination = new char[len];
        }
        System.arraycopy(buffer, 0, destination, 0, len);
        return destination;
    }
public char [ ] getChars ( char [ ] destination ) { final int len = length ( ) ; if ( destination == null || destination . length < len ) { destination = new char [ len ] ; } System . arraycopy ( buffer , 0 , destination , 0 , len ) ; return destination ; }
Copies the character array into the specified array.

@param destination  the destination array, null will cause an array to be created
@return the input array, unless that was null or too small