Package com.orientechnologies.common.directmemory

Examples of com.orientechnologies.common.directmemory.ODirectMemory.moveData()


    rnd.nextBytes(value);

    long pointer = directMemory.allocate(value.length);
    directMemory.set(pointer, value, 0, value.length);

    directMemory.moveData(pointer, pointer + value.length / 2, value.length / 2);

    System.arraycopy(value, 0, value, value.length / 2, value.length / 2);

    Assert.assertEquals(value, directMemory.get(pointer, value.length));
View Full Code Here


    rnd.nextBytes(value);

    long pointer = directMemory.allocate(value.length);
    directMemory.set(pointer, value, 0, value.length);

    directMemory.moveData(pointer, pointer + 1, value.length / 3);

    System.arraycopy(value, 0, value, 1, value.length / 3);

    Assert.assertEquals(value, directMemory.get(pointer, value.length));
View Full Code Here

    rnd.nextBytes(value);

    long pointer = directMemory.allocate(value.length);
    directMemory.set(pointer, value, 0, value.length);

    directMemory.moveData(pointer + 2, pointer + 5, value.length / 3);

    System.arraycopy(value, 2, value, 5, value.length / 3);

    Assert.assertEquals(value, directMemory.get(pointer, value.length));
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.