Here you can find the source of byteArrayToString(byte[] data)
public static String byteArrayToString(byte[] data)
//package com.java2s; //License from project: Apache License import org.apache.commons.codec.binary.Hex; public class Main { public static String byteArrayToString(byte[] data) { return new String(Hex.encodeHex(data)); }/*from ww w. j a v a 2s . com*/ }