code: public static String toHexString(byte b) {
  		final char[] out = new char[2];
  		out[0] = hexDigits[(0xF0 & b) >>> 4];
  		out[1] = hexDigits[0x0F & b];
  		return new String(out);
  	}
docs: Converts a byte into a hex string (e.g. 164 -&gt; "a4")
  @param b input byte
  @return hex representation of input byte