This method of the SystemX class copies an array from the specified source array, beginning at the specified byte offset, to the specified byte offset of the destination array.
public native static void blockcopy(Object objSrc, int nSrcOffset, Object objDest, int nDestOffset, int cBytes);
Unlike java.lang.System.arraycopy, the source and destination arrays must be of primitive type, although not necessarily of the same primitive type. This method essentially performs a memory copy between arrays, ignoring byte endianness. A subsequence of bytes are copied from the source array, referenced by objSrc, to the destination array, referenced by objDest. The number of bytes copied is equal to the cBytes parameter. The components at byte offsets nSrcOffset through nSrcOffset+cBytes-1 in the source array are copied into destination array starting at byte offset nDestOffset.
If the objSrc and objDest parameters refer to the same array object, the copying is performed as if the bytes at byte offset nSrcOffset through nSrcOffset+cBytes-1 were first copied to a temporary array, and then the contents of the temporary array were copied into the destination array starting at byte offset nDestOffset.
If either of the following statements are true, an ArrayStoreException is thrown and the destination is not modified:
Otherwise, if any of the following statements are true, an ArrayIndexOutOfBoundsException is thrown and the destination is not modified:
objSrc | The source array. |
nSrcOffset | The start byte offset in the source array. |
objDest | The destination array. |
nDestOffset | The start byte offset in the destination data. |
cBytes | The number of bytes to be copied. |
ArrayIndexOutOfBoundsException occurs if copying would cause access of data outside array bounds.
ArrayStoreException occurs if objSrc or objDest is not an array of primitive type.
This method was added as of versions 2437 through 2925 of the Microsoft virtual machine.