Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { private static byte[] copyOfRange(byte[] source, int from, int to) { byte[] range = new byte[to - from]; System.arraycopy(source, from, range, 0, range.length); return range; } }