Package com.esotericsoftware.kryo.io

Examples of com.esotericsoftware.kryo.io.InputChunked.nextChunks()


    InputChunked inputChunked = new InputChunked(input, 1024);
    for (int i = 0, n = fields.length; i < n; i++) {
      CachedField cachedField = fields[i];
      if (cachedField == null) {
        if (TRACE) trace("kryo", "Skip obsolete field.");
        inputChunked.nextChunks();
        continue;
      }
      cachedField.read(inputChunked, object);
      inputChunked.nextChunks();
    }
View Full Code Here


        if (TRACE) trace("kryo", "Skip obsolete field.");
        inputChunked.nextChunks();
        continue;
      }
      cachedField.read(inputChunked, object);
      inputChunked.nextChunks();
    }
    return object;
  }
}
View Full Code Here

    Input input = new Input(output.getBuffer());
    assertEquals(1234, input.readInt());
    InputChunked inputChunked = new InputChunked(input);
    assertEquals(1, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 3
    assertEquals(3, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 4
    assertEquals(5, inputChunked.readInt());
View Full Code Here

    Input input = new Input(output.getBuffer());
    assertEquals(1234, input.readInt());
    InputChunked inputChunked = new InputChunked(input);
    assertEquals(1, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 3
    assertEquals(3, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 4
    assertEquals(5, inputChunked.readInt());
    assertEquals(5678, input.readInt());
View Full Code Here

    InputChunked inputChunked = new InputChunked(input);
    assertEquals(1, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 3
    assertEquals(3, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 4
    assertEquals(5, inputChunked.readInt());
    assertEquals(5678, input.readInt());
    input.close();
  }
View Full Code Here

    assertEquals(1, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 3
    assertEquals(3, inputChunked.readInt());
    inputChunked.nextChunks();
    inputChunked.nextChunks(); // skip 4
    assertEquals(5, inputChunked.readInt());
    assertEquals(5678, input.readInt());
    input.close();
  }
}
View Full Code Here

    for (int i = 0, n = fields.length; i < n; i++) {
      CachedField cachedField = fields[i];
      try {
        if (cachedField == null) {
          if (TRACE) trace("kryo", "Skip obsolete field.");
          inputChunked.nextChunks();
          continue;
        }

        if (TRACE) trace("kryo", "Read field: " + cachedField + " (" + getType().getName() + ")");
View Full Code Here

            value = kryo.readObject(inputChunked, concreteType, serializer);
        }

        cachedField.set(object, value);

        inputChunked.nextChunks();
      } catch (IllegalAccessException ex) {
        throw new KryoException("Error accessing field: " + cachedField + " (" + getType().getName() + ")", ex);
      } catch (KryoException ex) {
        ex.addTrace(cachedField + " (" + getType().getName() + ")");
        throw ex;
View Full Code Here

    for (int i = 0, n = fields.length; i < n; i++) {
      CachedField cachedField = fields[i];
      try {
        if (cachedField == null) {
          if (TRACE) trace("kryo", "Skip obsolete field.");
          inputChunked.nextChunks();
          continue;
        }

        if (TRACE) trace("kryo", "Read field: " + cachedField + " (" + getType().getName() + ")");
View Full Code Here

            value = kryo.readObjectOrNull(inputChunked, concreteType, serializer);
        }

        cachedField.set(object, value);

        inputChunked.nextChunks();
      } catch (IllegalAccessException ex) {
        throw new KryoException("Error accessing field in class: " + getType().getName(), ex);
      } catch (KryoException ex) {
        ex.addTrace(cachedField + " (" + getType().getName() + ")");
        throw ex;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.