Example #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);
 }
Example #2
0
 @Override
 public int getObjectSize(final ComparableBinary object, Object... hints) {
   return object.toByteArray().length;
 }
Example #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);
 }