Here you can find the source of int2CharHex(int integer)
public static String int2CharHex(int integer)
//package com.java2s; public class Main { private static char[] hexval = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; public static String int2CharHex(int integer) { int low = integer & 0xF; int high = (integer >> 4) & 0xF; return (Character.toString(hexval[high]) + Character.toString(hexval[low])); }/*from w w w . j a v a2 s .c om*/ }