Examples of BytesContainer


Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer

    assertEquals(OVarIntSerializer.readAsLong(bytes), 16238l);
  }

  @Test
  public void serializePosition() {
    BytesContainer bytes = new BytesContainer();
    bytes.offset = OVarIntSerializer.write(bytes, 16238);
    assertEquals(OVarIntSerializer.readAsLong(bytes), 16238l);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer

    assertEquals(OVarIntSerializer.readAsLong(bytes), 16238l);
  }

  @Test
  public void serializeMaxLong() {
    BytesContainer bytes = new BytesContainer();
    bytes.offset = OVarIntSerializer.write(bytes, Long.MAX_VALUE);
    assertEquals(OVarIntSerializer.readAsLong(bytes), Long.MAX_VALUE);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer

    assertEquals(OVarIntSerializer.readAsLong(bytes), Long.MAX_VALUE);
  }

  @Test
  public void serializeMinLong() {
    BytesContainer bytes = new BytesContainer();
    bytes.offset = OVarIntSerializer.write(bytes, Long.MIN_VALUE);
    assertEquals(OVarIntSerializer.readAsLong(bytes), Long.MIN_VALUE);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer

  }

  @Override
  @Test(enabled = false)
  public void cycle() {
    BytesContainer container = new BytesContainer();
    OVarIntSerializer.write(container, 20);
    OVarIntSerializer.write(container, 200);
    OVarIntSerializer.write(container, 20000);
    OVarIntSerializer.write(container, 200000000000000000L);
    container.offset = 0;
View Full Code Here

Examples of com.orientechnologies.orient.core.serialization.serializer.record.binary.BytesContainer

  }

  @Override
  @Test(enabled = false)
  public void cycle() {
    BytesContainer container = new BytesContainer();

    OIntegerSerializer.INSTANCE.serialize(20, container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.serialize(200, container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.serialize(20000, container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OLongSerializer.INSTANCE.serialize(200000000000000000L, container.bytes, container.offset);
    container.skip(OLongSerializer.LONG_SIZE);
    container.offset = 0;
    OIntegerSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OIntegerSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OIntegerSerializer.INT_SIZE);
    OLongSerializer.INSTANCE.deserialize(container.bytes, container.offset);
    container.skip(OLongSerializer.LONG_SIZE);
  }
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.