Examples of canReadInt()


Examples of com.esotericsoftware.kryo.io.UnsafeInput.canReadInt()

    write.writeVarInt(400, true);

    read = new UnsafeInput(write.toBytes());
    assertEquals(true, read.canReadInt());
    read.setLimit(read.limit() - 1);
    assertEquals(false, read.canReadInt());
  }

  public void testInts () throws IOException {
    runIntTest(new UnsafeOutput(4096));
    runIntTest(new UnsafeOutput(new ByteArrayOutputStream()));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeInput.canReadInt()

    assertEquals(-1048575, read.readInt());
    assertEquals(-134217727, read.readInt());
    assertEquals(-268435455, read.readInt());
    assertEquals(-134217728, read.readInt());
    assertEquals(-268435456, read.readInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(0, read.readInt(true));
    assertEquals(0, read.readInt(false));
    assertEquals(63, read.readInt(true));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeInput.canReadInt()

    assertEquals(-134217727, read.readInt());
    assertEquals(-268435455, read.readInt());
    assertEquals(-134217728, read.readInt());
    assertEquals(-268435456, read.readInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(0, read.readInt(true));
    assertEquals(0, read.readInt(false));
    assertEquals(63, read.readInt(true));
    assertEquals(63, read.readInt(false));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeInput.canReadInt()

    assertEquals(-268435455, read.readInt());
    assertEquals(-134217728, read.readInt());
    assertEquals(-268435456, read.readInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(0, read.readInt(true));
    assertEquals(0, read.readInt(false));
    assertEquals(63, read.readInt(true));
    assertEquals(63, read.readInt(false));
    assertEquals(64, read.readInt(true));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeInput.canReadInt()

    assertEquals(-1048576, read.readInt(true));
    assertEquals(-134217728, read.readInt(false));
    assertEquals(-134217728, read.readInt(true));
    assertEquals(-134217729, read.readInt(false));
    assertEquals(-134217729, read.readInt(true));
    assertEquals(false, read.canReadInt());

    Random random = new Random();
    for (int i = 0; i < 10000; i++) {
      int value = random.nextInt();
      write.clear();
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryInput.canReadInt()

  public void testCanReadInt () throws IOException {
    UnsafeMemoryOutput write = new UnsafeMemoryOutput(new ByteArrayOutputStream());

    Input read = new UnsafeMemoryInput(write.toBytes());
    assertEquals(false, read.canReadInt());

    write.writeVarInt(400, true);

    read = new UnsafeMemoryInput(write.toBytes());
    assertEquals(true, read.canReadInt());
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryInput.canReadInt()

    assertEquals(false, read.canReadInt());

    write.writeVarInt(400, true);

    read = new UnsafeMemoryInput(write.toBytes());
    assertEquals(true, read.canReadInt());
    read.setLimit(read.limit() - 1);
    assertEquals(false, read.canReadInt());
  }

  public void testInts () throws IOException {
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryInput.canReadInt()

    write.writeVarInt(400, true);

    read = new UnsafeMemoryInput(write.toBytes());
    assertEquals(true, read.canReadInt());
    read.setLimit(read.limit() - 1);
    assertEquals(false, read.canReadInt());
  }

  public void testInts () throws IOException {
    runIntTest(new UnsafeMemoryOutput(4096));
    runIntTest(new UnsafeMemoryOutput(new ByteArrayOutputStream()));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryInput.canReadInt()

    assertEquals(-1048575, read.readInt());
    assertEquals(-134217727, read.readInt());
    assertEquals(-268435455, read.readInt());
    assertEquals(-134217728, read.readInt());
    assertEquals(-268435456, read.readInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(0, read.readInt(true));
    assertEquals(0, read.readInt(false));
    assertEquals(63, read.readInt(true));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.UnsafeMemoryInput.canReadInt()

    assertEquals(-134217727, read.readInt());
    assertEquals(-268435455, read.readInt());
    assertEquals(-134217728, read.readInt());
    assertEquals(-268435456, read.readInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(true, read.canReadInt());
    assertEquals(0, read.readInt(true));
    assertEquals(0, read.readInt(false));
    assertEquals(63, read.readInt(true));
    assertEquals(63, read.readInt(false));
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.