Here you can find the source of toHexString(byte[] array)
public static String toHexString(byte[] array)
//package com.java2s; //License from project: Open Source License import javax.xml.bind.DatatypeConverter; public class Main { public static String toHexString(byte[] array) { return DatatypeConverter.printHexBinary(array); }/*w w w .j av a 2s. c o m*/ }