core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/stream/OStreamSerializerSBTreeIndexRIDContainer.java
@Override
  public void serializeInByteBufferObject(OIndexRIDContainer object, ByteBuffer buffer, Object... hints) {
    buffer.putLong(object.getFileId());

    final boolean embedded = object.isEmbedded();
    final boolean durable = object.isDurableNonTxMode();

    buffer.put((byte) (embedded ? 1 : 0));
    buffer.put((byte) (durable ? 1 : 0));

    if (embedded) {
      buffer.putInt(object.size());

      for (OIdentifiable ids : object) {
        LINK_SERIALIZER.serializeInByteBufferObject(ids, buffer);
      }
    } else {
      final OIndexRIDContainerSBTree underlying = (OIndexRIDContainerSBTree) object.getUnderlying();
      final OBonsaiBucketPointer rootPointer = underlying.getRootPointer();

      buffer.putLong(rootPointer.getPageIndex());
      buffer.putInt(rootPointer.getPageOffset());
    }
  }
@Override
  public void serializeInByteBufferObject(OIndexRIDContainer object, ByteBuffer buffer, Object... hints) {
    buffer.putLong(object.getFileId());

    final boolean embedded = object.isEmbedded();
    final boolean durable = object.isDurableNonTxMode();

    buffer.put((byte) (embedded ? 1 : 0));
    buffer.put((byte) (durable ? 1 : 0));

    if (embedded) {
      buffer.putInt(object.size());

      for (OIdentifiable ids : object) {
        LINK_SERIALIZER.serializeInByteBufferObject(ids, buffer);
      }
    } else {
      final OIndexRIDContainerSBTree underlying = (OIndexRIDContainerSBTree) object.getUnderlying();
      final OBonsaiBucketPointer rootPointer = underlying.getRootPointer();

      buffer.putLong(rootPointer.getPageIndex());
      buffer.putInt(rootPointer.getPageOffset());
    }
  }
{@inheritDoc}