Here you can find the source of copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)
public static void copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom)
//package com.java2s; public class Main { public static void copyBytes(byte[] source, byte[] dest, int sourceFrom, int copyLength, int destFrom) { sourceFrom = sourceFrom - 1;/* w ww .j a v a 2 s . c o m*/ destFrom = destFrom - 1; for (int i = destFrom; i < destFrom + copyLength; i++) { dest[i] = source[sourceFrom++]; } } }