Here you can find the source of subArray(byte[] src, int pos, int length)
public static byte[] subArray(byte[] src, int pos, int length)
//package com.java2s; public class Main { public static byte[] subArray(byte[] src, int pos, int length) { if (src == null || src.length < length - pos) { throw new IllegalArgumentException(); }/*from www. j a v a 2s . c o m*/ byte[] result = new byte[length]; System.arraycopy(src, pos, result, 0, length); return result; } }