Java tutorial
//package com.java2s; public class Main { public static byte[] get(byte[] array, int offset, int length) { byte[] result = new byte[length]; System.arraycopy(array, offset, result, 0, length); return result; } }