code: public static String toHex(byte b) {
      final char[] string = { hexDigits[(b >> 4) & 0x0f], hexDigits[b & 0x0f] };
      return new String(string);
    }
docs: Converts the specified byte value to a two digit hex string.
  @param b The <code>byte</code> value to convert to a string.
  @return The two digit hexadecimal representation of <code>b</code>.