Here you can find the source of subArray(byte[] src, int start)
public static byte[] subArray(byte[] src, int start)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] subArray(byte[] src, int start) { if (start == 0) { return src; }/* w ww . j av a2s. c o m*/ int length = src.length - start; byte[] dest = new byte[length]; System.arraycopy(src, start, dest, 0, length); return dest; } public static byte[] subArray(byte[] src, int start, int length) { if (start == 0 && src.length == length) { return src; } byte[] dest = new byte[length]; System.arraycopy(src, start, dest, 0, length); return dest; } }