Java tutorial
//package com.java2s; public class Main { public static byte[] subByteArr(byte[] srcByteArr, int startIndex, int subLength) { byte[] desData = new byte[subLength]; System.arraycopy(srcByteArr, startIndex, desData, 0, subLength); return desData; } }