code: public String encodedQuery() {
          if (queryNamesAndValues == null) return null; // No query.
          int queryStart = url.indexOf('?') + 1;
          int queryEnd = delimiterOffset(url, queryStart + 1, url.length(), '#');
          return url.substring(queryStart, queryEnd);
      }
docs: Returns the query of this URL, encoded for use in HTTP resource resolution. The returned string
  may be null (for URLs with no query), empty (for URLs with an empty query) or non-empty (all
  other URLs).
  
  <p><table summary="">
  <tr><th>URL</th><th>{@code encodedQuery()}</th></tr>
  <tr><td>{@code http://host/}</td><td>null</td></tr>
  <tr><td>{@code http://host/?}</td><td>{@code ""}</td></tr>
  <tr><td>{@code http://host/?a=apple&k=key+lime}</td><td>{@code
  "a=apple&k=key+lime"}</td></tr>
  <tr><td>{@code http://host/?a=apple&a=apricot}</td><td>{@code "a=apple&a=apricot"}</td></tr>
  <tr><td>{@code http://host/?a=apple&b}</td><td>{@code "a=apple&b"}</td></tr>
  </table>