Here you can find the source of appendHexString(StringBuilder builder, int value)
private static void appendHexString(StringBuilder builder, int value)
//package com.java2s; //License from project: Apache License public class Main { private static void appendHexString(StringBuilder builder, int value) { String hex = Integer.toHexString(value); if (hex.length() == 1) { builder.append("0"); }/* w w w . ja v a 2s .com*/ builder.append(hex); } }