docs: private HTTPAnnounceRequestMessage parseQuery(final String uri, final String hostAddress)
            throws IOException, MessageValidationException {
      Map<String, BEValue> params = new HashMap<String, BEValue>();
  
      try {
  //			String uri = request.getAddress().toString();
        for (String pair : uri.split("[?]")[1].split("&")) {
          String[] keyval = pair.split("[=]", 2);
          if (keyval.length == 1) {
            this.recordParam(params, keyval[0], null);
          } else {
            this.recordParam(params, keyval[0], keyval[1]);
          }
        }
      } catch (ArrayIndexOutOfBoundsException e) {
        params.clear();
      }
  
      // Make sure we have the peer IP, fallbacking on the request's source
      // address if the peer didn't provide it.
      if (params.get("ip") == null) {
        params.put("ip", new BEValue(
                hostAddress,
                Constants.BYTE_ENCODING));
      }
  
      return HTTPAnnounceRequestMessage.parse(new BEValue(params));
    }