Here you can find the source of arrayCopy(byte[] src, int srcPos, byte[] dest, int destPos, int length)
public static void arrayCopy(byte[] src, int srcPos, byte[] dest, int destPos, int length)
//package com.java2s; public class Main { public static void arrayCopy(byte[] src, int srcPos, byte[] dest, int destPos, int length) { if (length - destPos > src.length - srcPos) return; for (int i = destPos, j = srcPos; i < destPos + length; i++, j++) { dest[i] = src[j];/* w w w . j a v a2 s. c o m*/ } } }