Microsoft SDK for Java

getBoolean

The getBoolean method of the SafeArray Class contains the following signatures:

getBoolean(int sa_idx)
getBoolean(int sa_idx1, int sa_idx2)

getBoolean(int sa_idx)

Extracts an element of a one-dimensional SafeArray as a boolean.

Syntax

public native boolean getBoolean(int sa_idx);

Return Value

Returns the converted element value.

Parameters

sa_idx The element index, which ranges from the index of the lower bound to the index of the upper bound.

Exceptions

IndexOutOfBoundsException if the SafeArray is not one-dimensional or if sa_idx is not between the lower bound and the upper bound of the array (inclusive).

ClassCastException if the SafeArray element cannot be converted to the correct type by using the Win32 VariantChangeType function.

getBoolean(int sa_idx1, int sa_idx2)

Extracts an element of a two-dimensional SafeArray as a boolean.

Syntax

public boolean getBoolean(int sa_idx1, int sa_idx2);

Return Value

Returns the converted element value.

Parameters

sa_idx1 The first dimension index of the element that is extracted, which ranges from LBound(1) to UBound(1).
sa_idx2 The second dimension index of the element that is extracted, which ranges from LBound(2) to UBound(2).

Exceptions

IndexOutOfBoundsException if the SafeArray is not two-dimensional or if neither index is between the lower bound and the upper bound of the array (inclusive).

ClassCastException if the SafeArray element cannot be converted to the correct type by using the Win32 VariantChangeType function.

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