Here you can find the source of substring(byte[] array, int start)
public static byte[] substring(byte[] array, int start)
//package com.java2s; public class Main { public static byte[] substring(byte[] array, int start) { return substring(array, start, array.length); }/* w ww.j a v a 2 s . co m*/ public static byte[] substring(byte[] array, int start, int end) { if (end <= start) return null; int length = (end - start); byte[] newArray = new byte[length]; System.arraycopy(array, start, newArray, 0, length); return newArray; } }