private void flushCharacters()
    {
        int indentLength = 0;
        int len = charBuffer.length();
        /*
         * Count characters from end of ignorable whitespace to first end of line we hit
         */
        for ( int i = len - 1; i >= 0; i-- )
        {
            char ch = charBuffer.charAt( i );
            switch ( ch )
            {
                case '\n':
                case '\r':
                    lastIndent = new Indent( charLineNumber, indentLength );
                    charBuffer.setLength( 0 );
                    return;
                case ' ':
                case '\t':
                    indentLength++;
                    break;
                default:
                    /*
                     * No end of line foundIndent in the trailing whitespace. Leave the foundIndent from previous
                     * ignorable whitespace unchanged
                     */
                    charBuffer.setLength( 0 );
                    return;
            }
        }
    }
private void flushCharacters ( ) { int indentLength = 0 ; int len = charBuffer . length ( ) ; for ( int i = len - 1 ; i >= 0 ; i -- ) { char ch = charBuffer . charAt ( i ) ; switch ( ch ) { case '\n' : case '\r' : lastIndent = new Indent ( charLineNumber , indentLength ) ; charBuffer . setLength ( 0 ) ; return ; case ' ' : case '\t' : indentLength ++ ; break ; default : charBuffer . setLength ( 0 ) ; return ; } } }
Sets {@link lastIndent} based on {@link #charBuffer} and resets {@link #charBuffer}.