code: protected AbstractBuffer reset(long offset, long capacity, long maxCapacity) {
      this.offset = offset;
      this.capacity = 0;
      this.initialCapacity = capacity;
      this.maxCapacity = maxCapacity;
      capacity(initialCapacity);
      references.set(0);
      rewind();
      return this;
    }
docs: Resets the buffer's internal offset and capacity.