public String getNextString() {
        if ( position < 0 )
            return "";

        StringBuilder newString = new StringBuilder();
        char ch;

        while ( position < buffer.length() ) {
            ch = buffer.charAt(position++);
            if (ch != ' ')
                newString.append(ch);
            else if ( newString.length() > 0 )
                break;
        }

        if ( position >= buffer.length() )
            position = -1;

        return newString.toString();
    }