Here you can find the source of toChar(int c)
private static String toChar(int c)
//package com.java2s; //License from project: Open Source License public class Main { private static final String CHARS = "0123456789ABCDEF"; private static String toChar(int c) { int pos = Math.abs(c); return String.valueOf(CHARS.charAt(pos)); }/*from w w w . ja v a 2 s. c o m*/ }