예제 #1
0
 @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;
 }
예제 #2
0
 @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;
 }
예제 #3
0
 @Override
 public Object read(Object reuse, Decoder dec) throws IOException {
   return _branchLookup[dec.readUnionIndex()].read(reuse, dec);
 }
예제 #4
0
 @Override
 public Object read(Object reuse, Decoder dec) throws IOException {
   return _enumAccess.createEnum(reuse, dec.readEnum());
 }
예제 #5
0
 @Override
 public Object read(Object reuse, Decoder dec) throws IOException {
   return dec.readBytes();
 }
예제 #6
0
 @Override
 public Object read(Object reuse, Decoder dec) throws IOException {
   dec.readNull();
   return null;
 }