Here you can find the source of copyBytesIntoByteArrayUpToLength(byte[] dest, byte[] src, int offset)
public static void copyBytesIntoByteArrayUpToLength(byte[] dest, byte[] src, int offset)
//package com.java2s; public class Main { public static void copyBytesIntoByteArrayUpToLength(byte[] dest, byte[] src, int offset) { for (int i = 0; i < offset; i++) { dest[i] = src[i];// w ww . jav a 2s . c om } } }