Java tutorial
//package com.java2s; public class Main { public static String decodeByteToHexString(byte src) { byte[] des = new byte[2]; des[1] = (byte) (src & 0x0f); des[0] = (byte) ((src & 0xf0) >> 4); return Integer.toHexString(des[0]) + Integer.toHexString(des[1]); } }