Here you can find the source of copyBytesIntoByteArray(byte[] dest, byte[] src)
public static void copyBytesIntoByteArray(byte[] dest, byte[] src)
//package com.java2s; public class Main { public static void copyBytesIntoByteArray(byte[] dest, byte[] src) { copyBytesIntoByteArrayAtOffset(dest, src, 0); }/*from ww w . j a va 2 s .c o m*/ public static void copyBytesIntoByteArrayAtOffset(byte[] dest, byte[] src, int offset) { for (int i = 0; i < src.length; i++) { dest[offset + i] = src[i]; } } }