code: public static String convertBytesToHexString(byte[] data)
      {
          StringBuilder buffer = new StringBuilder(data.length * 2);
          for (byte b : data)
          {
              buffer.append(HEX_CHARS[(b >>> 4) & 0x0F]);
              buffer.append(HEX_CHARS[b & 0x0F]);
          }
          return buffer.toString();
      }
docs: Converts an array of bytes in to a String of hexadecimal characters (0 - F).
  @param data An array of bytes to convert to a String.
  @return A hexadecimal String representation of the data.