Here you can find the source of getString(byte[] value)
public static String getString(byte[] value)
//package com.java2s; public class Main { public static String getString(byte[] value) { StringBuilder stringBuilder = new StringBuilder(""); for (int i = 0; i < value.length; i++) { int v = value[i] & 0xFF; String hv = Integer.toHexString(v); if (hv.length() < 2) { stringBuilder.append(0); }//from w ww . j av a 2 s .c om stringBuilder.append(hv); } return stringBuilder.toString(); } }