This method of the IntArrayOutputStream Class decreases the number of integers in the IntArrayOutputStream object to the specified number.
public synchronized void truncate(int newsize);
newsize | The number of integers that the truncated output stream will hold. |
ArrayIndexOutOfBoundsException if the specified number exceeds or equals the number of integers currently in the output stream.