Here you can find the source of byteToStr(byte input)
private static String byteToStr(byte input)
//package com.java2s; //License from project: Apache License public class Main { private static String byteToStr(byte input) { String res = Integer.toHexString(input & 0xff); if (res.length() < 2) { res = "0" + res; }/* w w w .j av a2s . com*/ return res; } }