Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] byteArraySlice(byte[] b, int offset, int length) { byte[] ret = new byte[length]; System.arraycopy(b, offset, ret, 0, length); return ret; } }