This method of the Variant Class extracts a SafeArray object from a Variant object that has the VT_ARRAY modifier set. This operation does not create an independent SafeArray object, so it can be used to modify the elements of the SafeArray object that is referenced by the Variant.
public SafeArray toSafeArray() throws ClassCastException;
Returns the coerced value that is converted to a Java SafeArray object.
ClassCastException if the object's type cannot be coerced.