Here you can find the source of copyOfRange(byte[] bytes, int offset, int len)
public static byte[] copyOfRange(byte[] bytes, int offset, int len)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] copyOfRange(byte[] bytes, int offset, int len) { byte[] result = new byte[len]; System.arraycopy(bytes, offset, result, 0, len); return result; }//w w w . ja va 2 s .c o m }