@Override public Object read(Object reuse, Decoder dec) throws IOException { Object map = _mapAccess.create(reuse); for (int n = (int) dec.readMapStart(); n != 0; n = (int) dec.readMapNext()) { _mapAccess.addElements(map, n, _valueReader, dec, false); } return map; }
@Override public Object read(Object reuse, Decoder dec) throws IOException { Object array = _arrayAccess.create(reuse); int i = 0; for (int n = (int) dec.readArrayStart(); n != 0; n = (int) dec.readArrayNext()) { array = _arrayAccess.ensureSize(array, i + n); _arrayAccess.addElements(array, n, i, _itemReader, dec, _reusable); i += n; } array = _arrayAccess.resize(array, i); return array; }
@Override public Object read(Object reuse, Decoder dec) throws IOException { return _branchLookup[dec.readUnionIndex()].read(reuse, dec); }
@Override public Object read(Object reuse, Decoder dec) throws IOException { return _enumAccess.createEnum(reuse, dec.readEnum()); }
@Override public Object read(Object reuse, Decoder dec) throws IOException { return dec.readBytes(); }
@Override public Object read(Object reuse, Decoder dec) throws IOException { dec.readNull(); return null; }