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