code: public ProxySettings setServer(URI uri)
      {
          if (uri == null)
          {
              return this;
          }
  
          String scheme   = uri.getScheme();
          String userInfo = uri.getUserInfo();
          String host     = uri.getHost();
          int port        = uri.getPort();
  
          return setServer(scheme, userInfo, host, port);
      }
docs: Set the proxy server by a URI. The parameters are updated as
  described below.
  
  <blockquote>
  <dl>
  <dt>Secure</dt>
  <dd><p>
  If the URI contains the scheme part and its value is
  either {@code "http"} or {@code "https"} (case-insensitive),
  the {@code secure} parameter is updated to {@code false}
  or to {@code true} accordingly. In other cases, the parameter
  is not updated.
  </p></dd>
  <dt>ID &amp; Password</dt>
  <dd><p>
  If the URI contains the userinfo part and the ID embedded
  in the userinfo part is not an empty string, the {@code
  id} parameter and the {@code password} parameter are updated
  accordingly. In other cases, the parameters are not updated.
  </p></dd>
  <dt>Host</dt>
  <dd><p>
  The {@code host} parameter is always updated by the given URI.
  </p></dd>
  <dt>Port</dt>
  <dd><p>
  The {@code port} parameter is always updated by the given URI.
  </p></dd>
  </dl>
  </blockquote>
  
  @param uri
  The URI of the proxy server. If {@code null} is given,
  none of the parameters is updated.
  
  @return
  {@code this} object.