Here you can find the source of removeId(byte[] in, Integer id)
public static byte[] removeId(byte[] in, Integer id)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static byte[] removeId(byte[] in, Integer id) { byte[] out = null; if (in != null) { String[] idArr = (new String(in)).split(","); List<String> idList = new ArrayList<String>(Arrays.asList(idArr)); if (idList.remove(id.toString()) && idList.size() > 0) { String idStr = idList.toString().replaceAll("\\[", "").replaceAll("\\]", "").replaceAll(" ", "") .trim();/*from w ww.j a v a 2 s . c o m*/ out = idStr.getBytes(); } } return out; } }