The list of methods to do Array Copy are organized into topic(s).
void
arrayBig2Small(int[] big, int bigWidth, int[][] small, int startRow, int startCol, int endRow, int endCol) array Big Small
int j = 0;
for (int i = startRow; i <= endRow; i++, j++) {
System.arraycopy(big, i * bigWidth + startCol, small[j], 0, endCol - startCol + 1);
void
arraycopy(byte[] src, int src_position, byte[] dst, int dst_position, int length) arraycopy
if (src_position < 0)
throw new IllegalArgumentException("src_position was less than 0. Actual value " + src_position);
if (src_position >= src.length)
throw new IllegalArgumentException(
"src_position was greater than src array size. Tried to write starting at position "
+ src_position + " but the array length is " + src.length);
if (src_position + length > src.length)
throw new IllegalArgumentException(
...
void
arrayCopy(byte[] src, int srcStart, byte[] dest, int destStart, int destBitOffset, int lengthInBits) array Copy
int c = 0;
int nBytes = lengthInBits / 8;
int nRestBits = lengthInBits % 8;
for (int i = 0; i < nBytes; i++) {
c |= ((src[srcStart + i] & 0xff) << destBitOffset);
dest[destStart + i] |= (byte) (c & 0xff);
c >>>= 8;
if (nRestBits > 0) {
c |= ((src[srcStart + nBytes] & (0xff >> (8 - nRestBits))) << destBitOffset);
if ((nRestBits + destBitOffset) > 0) {
dest[destStart + nBytes] |= c & 0xff;
void
arraycopy(char[] A1, int offset1, char[] A2, int offset2, int length) Copies the contents of
A1 starting at offset
offset1 into
A2 starting at offset
offset2 for
length elements.
if (offset1 >= 0 && offset2 >= 0 && length >= 0 && length <= A1.length - offset1
&& length <= A2.length - offset2) {
if (A1 != A2 || offset1 > offset2 || offset1 + length <= offset2) {
for (int i = 0; i < length; ++i) {
A2[offset2 + i] = A1[offset1 + i];
} else {
for (int i = length - 1; i >= 0; --i) {
...