code: public void ensureCapacity(final int minCapacity) {
          if (minCapacity > fixedSize) {
              throw new IllegalArgumentException(
                      "Trying to increase fixed-size buffer");
          }
          final int oldCapacity = super.buf.length;
          if (minCapacity > oldCapacity) {
              int newCapacity = oldCapacity * 3 / 2 + 1;
              if (newCapacity < oldCapacity + defaultIncrement) {
                  newCapacity = oldCapacity + defaultIncrement;
              }
              if (newCapacity < minCapacity) {
                  newCapacity = minCapacity;
              }
              newCapacity = Math.min(fixedSize, newCapacity);
              // minCapacity is usually close to size, so this is a win:
              final byte[] tmp = new byte[newCapacity];
              System.arraycopy(super.buf, 0, tmp, 0, super.count);
              super.buf = tmp;
          }
      }
docs: Increases the capacity of this <tt>OtpOutputStream</tt> instance, if
  necessary, to ensure that it can hold at least the number of elements
  specified by the minimum capacity argument.
  
  @param minCapacity
  the desired minimum capacity