Here you can find the source of removeTrailing(final byte[] id)
public static byte[] removeTrailing(final byte[] id)
//package com.java2s; //License from project: BSD License import java.util.Arrays; public class Main { public static byte[] removeTrailing(final byte[] id) { final int length = id.length; if (length == 0) { return null; }//from w ww. j av a 2 s. c om return Arrays.copyOf(id, length - 1); } }