public static String byteArraytoHexString(byte[] b) {
    StringBuilder sb = new StringBuilder();
    for (byte btemp : b) {
      byte b1 = (byte) ((btemp >> 4) & 0x0f);
      sb.append(tohex(b1));
      byte b2 = (byte) (btemp & 0x0f);
      sb.append(tohex(b2));
    }
    return sb.toString();
  }
Utility class for dealing with byte strings

@author Stan Love
@version 0.0.1
olv-vfs/src/main/java/net/sf/vfsjfilechooser/accessories/bookmarks/Util.java