Here you can find the source of copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len)
public static void copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len)
//package com.java2s; public class Main { public static void copyBytes(byte[] dstBytes, int dstFrom, byte[] srcBytes, int srcFrom, int len) { for (int i = 0; i < len; i++) { dstBytes[dstFrom + i] = srcBytes[srcFrom + i]; }//from w w w . ja va 2s . c om } public static void copyBytes(byte[] dstBytes, int dstFrom, byte srcByte, int len) { for (int i = 0; i < len; i++) { dstBytes[dstFrom + i] = srcByte; } } }