Here you can find the source of int2hex(int i)
public static char int2hex(int i)
//package com.java2s; public class Main { public static final char[] HEX_CHARS = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; /**//from w w w . java 2 s. com * Converts integer digit to heck char. */ public static char int2hex(int i) { return HEX_CHARS[i]; } }