Here you can find the source of ArrayMove(byte b[], int srcOff, int dstOff, int Len)
public static void ArrayMove(byte b[], int srcOff, int dstOff, int Len)
//package com.java2s; //License from project: Open Source License public class Main { public static void ArrayMove(byte b[], int srcOff, int dstOff, int Len) { int i, j, k; if (null == b || 0 == b.length || Len <= 0) { return; }//from www .ja v a 2s .c o m 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]; } } } }