Here you can find the source of dumpBytes(byte[] a)
public static String dumpBytes(byte[] a)
//package com.java2s; public class Main { public static String dumpBytes(byte[] a) { StringBuilder sb = new StringBuilder(a.length * 2); for (byte b : a) sb.append(String.format("%x", b & 0xff)); return sb.toString(); }//from w ww . j a v a2s .co m }