maybe we could just have `buffer = ArrayUtil.grow(buffer, numDocs)`?