code: 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());
    }
docs: Creates the resource from a url...
  
  @param url
  @return the resource