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) * RamUsageEstimator.NUM_BYTES_INT32);}pool.Append(bytes);offsets[lastElement++] = currentOffset;currentOffset += bytes.Length;return lastElement - 1;}