code: private static String byteArrayToHexString(byte[] b)
  	{
  		StringBuilder sb = new StringBuilder(b.length * 2);
  		for (int i = 0; i < b.length; i++)
  		{
  			int v = b[i] & 0xff;
  			if (v < 16)
  			{
  				sb.append('0');
  			}
  			sb.append(Integer.toHexString(v));
  		}
  		return sb.toString().toUpperCase();
  	}
docs: --------------------------------------------------------