docs: public final int getNewBufferSize(int curSize, int minNewSize) {
        if (curSize <= maxDoublingSize)
           return Math.max(curSize << 1, minNewSize);
        else
           return Math.max(curSize + (curSize >> 2), minNewSize);
     }