Microsoft SDK for Java

reduceCapacity

This method of the IntArrayOutputStream Class shrinks the storage of the IntArrayOutputStream object to the requested capacity. If the requested capacity is greater than or equal to the capacity of the output stream, the capacity of the output stream remains unchanged.

Syntax

public synchronized int reduceCapacity(int capacity);

Return Value

Returns the actual capacity of the output stream.

Parameters

capacity The maximum required capacity of the output stream.

Exceptions

ArrayIndexOutOfBoundsException if the number of integers currently in the output stream exceeds the requested capacity.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.