Here you can find the source of printByte(byte b)
public static String printByte(byte b)
//package com.java2s; //License from project: Apache License public class Main { public static String printByte(byte b) { final String BYTE_FORMAT = "%02x"; return String.format(BYTE_FORMAT, b); }/*w w w .j av a2 s . c o m*/ }