Here you can find the source of removeLast(byte[] target, int end)
public static byte[] removeLast(byte[] target, int end)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static byte[] removeLast(byte[] target, int end) { return Arrays.copyOfRange(target, 0, end); }// www . ja v a 2s . c om }