Java tutorial
//package com.java2s; public class Main { private static void appendHex(StringBuffer paramStringBuffer, byte paramByte) { paramStringBuffer.append("0123456789ABCDEF".charAt(paramByte >> 4 & 0xF)) .append("0123456789ABCDEF".charAt(paramByte & 0xF)); } }