Here you can find the source of subArray(byte[] src, int start, int limit)
public static byte[] subArray(byte[] src, int start, int limit)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] subArray(byte[] src, int start, int limit) { byte[] buff = new byte[limit]; for (int i = 0; i < limit; i++) { buff[i] = src[start++];//from w w w.j a va 2s .c om } return buff; } public static byte[] subArray(byte[] src, int start) { if (start < 0) { return subArray(src, src.length + start, -1 * start); } return subArray(src, start, src.length - start); } }