code: SegmentDescriptor copyTo(Buffer buffer) {
      this.buffer = buffer
        .writeLong(id)
        .writeLong(version)
        .writeLong(index)
        .writeUnsignedInt(maxSegmentSize)
        .writeInt(maxEntries)
        .writeLong(updated)
        .writeBoolean(locked)
        .skip(BYTES - buffer.position())
        .flush();
      return this;
    }
docs: Copies the segment to a new buffer.