text: public int append(BytesRef bytes) {if (lastElement >= offsets.length) {int oldLen = offsets.length;offsets = ArrayUtil.grow(offsets, offsets.length + 1);bytesUsed.addAndGet((offsets.length - oldLen) * Integer.BYTES);}pool.append(bytes);offsets[lastElement++] = currentOffset;currentOffset += bytes.length;return lastElement-1;}