Java Utililty Methods Array Move

List of utility methods to do Array Move

Description

The list of methods to do Array Move are organized into topic(s).

Method

voidArrayMove(byte b[], int srcOff, int dstOff, int Len)
Array Move
int i, j, k;
if (null == b || 0 == b.length || Len <= 0) {
    return;
if (srcOff > dstOff) {
    if (b.length < srcOff + Len) {
        Len = b.length - srcOff;
    k = srcOff + Len;
    for (i = srcOff, j = dstOff; i < k; i++, j++) {
        b[j] = b[i];
} else if (srcOff < dstOff) {
    if (b.length < dstOff + Len) {
        Len = b.length - dstOff;
    k = dstOff + Len - 1;
    for (i = srcOff + Len - 1, j = k; i >= srcOff; i--, j--) {
        b[j] = b[i];