code: private void writePointer(int index, ByteBuffer pointer) {
      int limit = memoryBuffer.limit();
      int pos = memoryBuffer.position();
      int pointerOffset = computePointerOffset(index);
      memoryBuffer.limit(pointerOffset + POINTER_SIZE_BYTES);
      memoryBuffer.position(pointerOffset);
      memoryBuffer.put(pointer);
      memoryBuffer.limit(limit);
      memoryBuffer.position(pos);
    }
docs: Write the provided pointer at the specified index.
  (Assumes limit on buffer is correctly set)
  (Position of the buffer changed)