public IonType next()
    {
        if (!hasNext()) {
            return null;
        }
        if (_value_type == null && _scanner.isUnfinishedToken()) {
            try {
                token_contents_load(_scanner.getToken());
            }
            catch (IOException e) {
                throw new IonException(e);
            }
        }
        _has_next_called = false;
        return _value_type;
    }
public IonType next ( ) { if ( ! hasNext ( ) ) { return null ; } if ( _value_type == null && _scanner . isUnfinishedToken ( ) ) { try { token_contents_load ( _scanner . getToken ( ) ) ; } catch ( IOException e ) { throw new IonException ( e ) ; } } _has_next_called = false ; return _value_type ; }
returns the type of the next value in the stream.
it calls hasNext to assure that the value has been properly
started, since hasNext prepares a value as a side effect of
determining whether or not a value is pending.
A NoSuchElementException is thrown if there are not values remaining.
Once called if there is a value available it's contents can
be accessed through the other public API's (such as getLong()).
@return type of the next value, or null if there is none.