Java tutorial
//package com.java2s; public class Main { public static String byte2hex(byte paramByte) { StringBuffer localStringBuffer = new StringBuffer(); char[] arrayOfChar = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70 }; int i = (paramByte & 0xF0) >> 4; int j = paramByte & 0xF; localStringBuffer.append(arrayOfChar[i]); localStringBuffer.append(arrayOfChar[j]); return localStringBuffer.toString(); } }