Java tutorial
//package com.java2s; public class Main { public static byte[] extractByteArray(byte[] body, int start, int length) { byte[] a = new byte[length]; System.arraycopy(body, start, a, 0, length); return a; } }