public void setResourceUrl(URL resourceUrl) {
        Assert.isNotNull(resourceUrl);
        endRequest();
        URL oldOriginServerUrl = null;
        URL newOriginServerUrl = null;
        try {
            oldOriginServerUrl = new URL(this.resourceUrl.getProtocol(), this.resourceUrl.getHost(), this.resourceUrl.getPort(), "/"); //$NON-NLS-1$
            newOriginServerUrl = new URL(resourceUrl.getProtocol(), resourceUrl.getHost(), resourceUrl.getPort(), "/"); //$NON-NLS-1$
        } catch (MalformedURLException e) {
            // ignore?
        }
        if (!oldOriginServerUrl.equals(newOriginServerUrl)) {
            try {
                close();
            } catch (IOException e) {
                // ignore?
            }
        }
        this.resourceUrl = resourceUrl;
    }
public void setResourceUrl(URL resourceUrl) {
        Assert.isNotNull(resourceUrl);
        endRequest();
        URL oldOriginServerUrl = null;
        URL newOriginServerUrl = null;
        try {
            oldOriginServerUrl = new URL(this.resourceUrl.getProtocol(), this.resourceUrl.getHost(), this.resourceUrl.getPort(), "/"); 
            newOriginServerUrl = new URL(resourceUrl.getProtocol(), resourceUrl.getHost(), resourceUrl.getPort(), "/"); 
        } catch (MalformedURLException e) {
            
        }
        if (!oldOriginServerUrl.equals(newOriginServerUrl)) {
            try {
                close();
            } catch (IOException e) {
                
            }
        }
        this.resourceUrl = resourceUrl;
    }
public void setResourceUrl ( URL resourceUrl ) { Assert . isNotNull ( resourceUrl ) ; endRequest ( ) ; URL oldOriginServerUrl = null ; URL newOriginServerUrl = null ; try { oldOriginServerUrl = new URL ( this . resourceUrl . getProtocol ( ) , this . resourceUrl . getHost ( ) , this . resourceUrl . getPort ( ) , "/" ) ; //$NON-NLS-1$ newOriginServerUrl = new URL ( resourceUrl . getProtocol ( ) , resourceUrl . getHost ( ) , resourceUrl . getPort ( ) , "/" ) ; //$NON-NLS-1$ } catch ( MalformedURLException e ) { // ignore? } if ( ! oldOriginServerUrl . equals ( newOriginServerUrl ) ) { try { close ( ) ; } catch ( IOException e ) { // ignore? } } this . resourceUrl = resourceUrl ; }
Sets the <code>URL</code> of this connection's resource.

@param resourceUrl the <code>URL</code> of this connection's resource
@see #getResourceUrl()
Sets the <code > URL< / code > of this connection s resource .