Microsoft SDK for Java

toByteArray

This method of the SafeArray Class converts an entire SafeArray to a Java array. If the SafeArray is multidimensional, it is treated as if it were a single linear array stored in column order. No matter where in the SafeArray the first element is located, that location is called index zero for the purposes of this method.

Syntax

public byte[] toByteArray();

Note   This method attempts all the usual type conversions. To achieve optimal performance, ensure that the element size of the source and destination arrays match exactly, so that the method optimizes to a straight memory copy (memcpy).

Return Value

Returns the flattened contents of the array.

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