Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static byte[] subRange(final byte[] bytes, int start, int length) { return Arrays.copyOfRange(bytes, start, start + length); } }