This method of the IntArrayOutputStream Class ensures that the IntArrayOutputStream object has enough storage capacity for the specified number of integers. If current capacity exceeds the specified capacity, the current capacity remains unchanged.
public synchronized int ensureCapacity(int capacity);
Returns the actual capacity of the output stream.
capacity | The minimum required capacity of the output stream. |