Java tutorial
//package com.java2s; public class Main { public static String bytesToNoSpaceHexString(byte abyte0[]) { StringBuilder stringbuilder = new StringBuilder(); for (int i = 0; i < abyte0.length; i++) { stringbuilder.append(String.format("%02x", new Object[] { Byte.valueOf(abyte0[i]) })); } return stringbuilder.toString(); } }