code: public static String byteToHex(byte[] data) {
          if (data == null) {
              return null;
          }
          final StringBuilder builder = new StringBuilder();
          for (final byte b : data) {
              builder.append(String.format("%02X", b));
          }
          return builder.toString();
      }
docs: Convert byte data to hex code string.
  
  @param data to convert.
  @return the hex code of the byte array.