public ProxySettings setServer(URL url)
    {
        if (url == null)
        {
            return this;
        }

        try
        {
            return setServer(url.toURI());
        }
        catch (URISyntaxException e)
        {
            throw new IllegalArgumentException(e);
        }
    }
public ProxySettings setServer ( URL url ) { if ( url == null ) { return this ; } try { return setServer ( url . toURI ( ) ) ; } catch ( URISyntaxException e ) { throw new IllegalArgumentException ( e ) ; } }
Set the proxy server by a URL. See the description of
{@link #setServer(URI)} about how the parameters are updated.

@param url
The URL of the proxy server. If {@code null} is given,
none of the parameters are updated.

@return
{@code this} object.

@throws IllegalArgumentException
Failed to convert the given URL to a {@link URI} instance.