Here you can find the source of hexToString(byte[] ids)
public static String hexToString(byte[] ids)
//package com.java2s; public class Main { public static String hexToString(byte[] ids) { StringBuffer id = new StringBuffer(); for (int i = 0; i < ids.length; i++) { char c = (char) (((ids[i] >> 4) & 0x0f) + 0x30); id.append(c);//from w ww. j av a2 s . c om c = (char) (((ids[i]) & 0x0f) + 0x30); id.append(c); } return id.toString(); } }