code: private void grow() {
      int newCapacity = buf.length + (buf.length >> 1);
      if (newCapacity - (Integer.MAX_VALUE - 8) > 0) {
        newCapacity = Integer.MAX_VALUE - 8;
      }
      buf = Arrays.copyOf(buf, newCapacity);
      this.limit = newCapacity;
    }
docs: Grow data array.