*
* @param args the arguments
*/
public static void main(String[] args) {
int length = 5, x = 4, y = 3;
OffHeapByteBuffer buffer = new OffHeapByteBuffer(0,1000);
SimpleObject object = new SimpleObject(x, y);
for (int i = 0; i < length; i++) {
byte [] payload = serialize(object);
Pointer pointer = buffer.store(payload);
SimpleObject simpleObject = deserialize(buffer.retrieve(pointer));
if(object.getX()!=simpleObject.getX()&&object.getY()!=simpleObject.getY()){
System.err.println("Problem");
}
}
Pointer pointer = buffer.update(new Pointer(115, buffer), new byte[200]);
if(buffer.retrieve(pointer).length!=200){
System.err.println("Problem");
}
buffer.retrieve(new Pointer(115, buffer));
}