code: public static PacProxySelector buildPacSelectorForUrl(String url) {
      PacProxySelector result = null;
      PacScriptSource pacSource = new UrlPacScriptSource(url);
      if (pacSource.isScriptValid()) {
        result = new PacProxySelector(pacSource);
      }
      return result;
    }
docs: ***********************************************************************
  Build a PAC proxy selector for the given URL.
  
  @param url
  to fetch the PAC script from.
  @return a PacProxySelector or null if it is not possible to build a working
  selector.
  **********************************************************************