code: public static byte[] hexToBinary(String hexValue) throws IllegalArgumentException {
          Utils.require(hexValue.length() % 2 == 0,
                        "Invalid hex value (must be a multiple of 2 chars): " + hexValue);
          return DatatypeConverter.parseHexBinary(hexValue);
      }
docs: Convert (decode) the given Hex-encoded String to its binary form.
  
  @param hexValue                  Hex-encoded string.
  @return                          Decoded binary value.
  @throws IllegalArgumentException If the given string is not a valid hex value.