Ejemplo n.º 1
0
 @Override
 public void serialize(
     final ComparableBinary object,
     final byte[] stream,
     final int startPosition,
     Object... hints) {
   final byte[] buffer = object.toByteArray();
   System.arraycopy(buffer, 0, stream, startPosition, buffer.length);
 }
Ejemplo n.º 2
0
 @Override
 public int getObjectSize(final ComparableBinary object, Object... hints) {
   return object.toByteArray().length;
 }
Ejemplo n.º 3
0
 @Override
 public void serializeInDirectMemory(
     ComparableBinary object, ODirectMemoryPointer pointer, long offset, Object... hints) {
   final byte[] buffer = object.toByteArray();
   pointer.set(offset, buffer, 0, buffer.length);
 }