This method of the IntArrayOutputStream Class retrieves the number of integers in the IntArrayOutputStream object.
public int size();
Returns the number of integers in the output stream.