Search in sources :

Example 11 with SavePoint

use of com.amazon.ion.impl.UnifiedSavePointManagerX.SavePoint in project ion-java by amzn.

the class UnifiedInputStreamX method save_point_reset_to_prev.

protected final void save_point_reset_to_prev(SavePoint sp) {
    int idx = sp.getPrevIdx();
    UnifiedDataPageX curr = _buffer.getPage(idx);
    int pos = sp.getPrevPos();
    int limit = sp.getPrevLimit();
    make_page_current(curr, idx, pos, limit);
}
Also used : SavePoint(com.amazon.ion.impl.UnifiedSavePointManagerX.SavePoint)

Example 12 with SavePoint

use of com.amazon.ion.impl.UnifiedSavePointManagerX.SavePoint in project ion-java by amzn.

the class IonReaderTextRawX method finish_value.

private final void finish_value(SavePoint sp) throws IOException {
    if (_scanner.isUnfinishedToken()) {
        if (sp != null && _value_type != null) {
            switch(_value_type) {
                case STRUCT:
                case SEXP:
                case LIST:
                    sp = null;
                    break;
                default:
                    break;
            }
        }
        _scanner.finish_token(sp);
        int new_state = get_state_after_value();
        set_state(new_state);
    }
    _has_next_called = false;
}
Also used : SavePoint(com.amazon.ion.impl.UnifiedSavePointManagerX.SavePoint)

Aggregations

SavePoint (com.amazon.ion.impl.UnifiedSavePointManagerX.SavePoint)12 FromByteArray (com.amazon.ion.impl.UnifiedInputStreamX.FromByteArray)1 IonTextUtils.printCodePointAsString (com.amazon.ion.util.IonTextUtils.printCodePointAsString)1