public static Resource create(URL url)
  {
    URLBuilder rootURL = URLBuilder.createFromPath("/");
    rootURL.setScheme(url.getProtocol());
    rootURL.setHost(url.getHost());
    rootURL.setPort(url.getPort());
    rootURL.setUserInfo(url.getUserInfo());

    return create(rootURL.toJavaURL(), "/").createRelative(url.getPath());
  }
public static Resource create(URL url)
  {
    URLBuilder rootURL = URLBuilder.createFromPath("/");
    rootURL.setScheme(url.getProtocol());
    rootURL.setHost(url.getHost());
    rootURL.setPort(url.getPort());
    rootURL.setUserInfo(url.getUserInfo());

    return create(rootURL.toJavaURL(), "/").createRelative(url.getPath());
  }
public static Resource create ( URL url ) { URLBuilder rootURL = URLBuilder . createFromPath ( "/" ) ; rootURL . setScheme ( url . getProtocol ( ) ) ; rootURL . setHost ( url . getHost ( ) ) ; rootURL . setPort ( url . getPort ( ) ) ; rootURL . setUserInfo ( url . getUserInfo ( ) ) ; return create ( rootURL . toJavaURL ( ) , "/" ) . createRelative ( url . getPath ( ) ) ; }
Creates the resource from a url...

@param url
@return the resource
Creates the resource from a url ...