code: public byte[] toByteArray(String hexString) {
      java.util.Objects.requireNonNull(hexString, "hexadecimal string");
      Objects.validArgument((hexString.length() & 0x1) == 0
          , "hexadecimal string <%s> must have an even number of characters.", hexString);
      int length = hexString.length();
      byte[] result = new byte[length >> 1];
      for (int i = 0; i < length; i += 2) {
        int hn = Character.digit(hexString.charAt(i), 16);
        int ln = Character.digit(hexString.charAt(i + 1), 16);
        result[i >> 1] = (byte) ((hn << 4) | ln);
      }
      return result;
    }
docs: Returns a byte array representation of hexadecimal string {@code hexString}.
  
  @param hexString  hexadecimal string to convert
  @return a byte array representation of hexadecimal string {@code hexString}