Here you can find the source of toHexChars(final int b)
private static char[] toHexChars(final int b)
//package com.java2s; public class Main { private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; private static char[] toHexChars(final int b) { final char left = HEX_DIGITS[(b >>> 4) & 0x0F]; final char right = HEX_DIGITS[b & 0x0F]; return new char[] { left, right }; }/*ww w . j a va 2 s . c om*/ }