Examples of URI


Examples of java.net.URI

        ci.out.println("> Command 'hack': Not enough parameters for subcommand parameter 'port'.");
        return false;
      }
      TRTrackerAnnouncer client = dm.getTrackerClient();
      try {
        URI uold = new URI(client.getTrackerURL().toString());
        String portStr = (String) args.get(0);
        URI unew = new URI(uold.getScheme(), uold.getUserInfo(), uold.getHost(), Integer.parseInt(portStr), uold.getPath(), uold.getQuery(), uold.getFragment());
        client.setTrackerURL(new URL(unew.toString()));
        ci.out.println("> Set Tracker URL for '"+dm.getSaveLocation()+"' to '"+unew.toString()+"'");
      } catch (Exception e) {
        ci.out.println("> Command 'hack': Assembling new tracker url failed: "+e.getMessage());
        return false;
      }
      return true;
View Full Code Here

Examples of java.net.URI

        ci.out.println("> Command 'hack': Not enough parameters for subcommand parameter 'host'.");
        return false;
      }
      TRTrackerAnnouncer client = dm.getTrackerClient();
      try {
        URI uold = new URI(client.getTrackerURL().toString());
        URI unew = new URI(uold.getScheme(), uold.getUserInfo(), (String)args.get(0), uold.getPort(), uold.getPath(), uold.getQuery(), uold.getFragment());
        client.setTrackerURL(new URL(unew.toString()));
        ci.out.println("> Set Tracker URL for '"+dm.getSaveLocation()+"' to '"+unew.toString()+"'");
      } catch (Exception e) {
        ci.out.println("> Command 'hack': Assembling new tracker url failed: "+e.getMessage());
        return false;
      }
      return true;
View Full Code Here

Examples of java.net.URI

      }
      TRTrackerAnnouncer client = dm.getTrackerClient();
     
      try {
        String uriStr = (String) args.get(0);
        URI uri = new URI(uriStr);
        client.setTrackerURL(new URL(uri.toString()));
        ci.out.println("> Set Tracker URL for '"+dm.getSaveLocation()+"' to '"+uri+"'");
      } catch (Exception e) {
        ci.out.println("> Command 'hack': Parsing tracker url failed: "+e.getMessage());
        return false;
      }
View Full Code Here

Examples of java.net.URI

            }
            // parse XQuery expression
            XQueryParser parser = new XQueryParser(is);
            StaticContext staticEnv = parser.getStaticContext();
            try {
                URI baseUri = url.toURI();
                staticEnv.setBaseURI(baseUri);
            } catch (URISyntaxException e) {
                log(PrintUtils.prettyPrintStackTrace(e, -1));
            }
            final XQueryModule module;
View Full Code Here

Examples of java.net.URI

           
            String jarName = url_str.substring(4, posPling);
           
              //        System.out.println("jarName: " + jarName);
           
            URI uri;
           
            try{
              uri = URI.create(jarName);
             
              if ( !new File(uri).exists()){
View Full Code Here

Examples of java.net.URI

    URL    url )
  {
    if ( url.getProtocol().equalsIgnoreCase("file")){
     
      try{
        return( new ResourceDownloaderFileImpl( null, new File( new URI( url.toString()))));
     
      }catch( Throwable e ){
       
        return( new ResourceDownloaderURLImpl( null, url ));
      }
View Full Code Here

Examples of java.net.URI

  }
 
  public HTTPContextInformationProvider() {
    IProxyService proxyService = Plugin.getDefault().getProxyService();
    try {
      _httpClient = new DefaultHttpClient(proxyService, new URI(BASE_URL));
    } catch (URISyntaxException e) {
      // should not happen
    }
    proxyService.addProxyChangeListener(this);    
  }
View Full Code Here

Examples of java.net.URI

      return downloadWGA(monitor, getWGADownloadURL());
  }
 
   public TemporaryFile downloadWGA(IProgressMonitor monitor, String url) throws IllegalStateException, IOException, URISyntaxException {
        monitor.setTaskName("Downloading OpenWGA from '" + url + "'");                    
        HttpClient client = new DefaultHttpClient((IProxyService)_proxyServiceTracker.getService(), new URI(url));
        GetMethod get = new GetMethod(url);
    int result = client.executeMethod(get);
    if (result == HttpURLConnection.HTTP_OK) {
      long size = get.getResponseContentLength();               
            TemporaryFile temp = new TemporaryFile("wga.war", new ProgressMonitorInputStream(monitor, "Downloading OpenWGA ", size, get.getResponseBodyAsStream()), getStateLocation().toFile());
View Full Code Here

Examples of java.net.URI

                t = next();
                switch (t.getType()) {
                    case Token.STRING:
                    case Token.URI:
                        try {
                            URI parent = new URI(stylesheet.getURI());
                            info.setUri(parent.resolve(getTokenValue(t)).toString());
                        } catch (URISyntaxException e) {
                            throw new CSSParseException("Invalid URL, " + e.getMessage(), getCurrentLine());
                        }
                        skip_whitespace();
                        t = la();
View Full Code Here

Examples of java.net.URI

    private boolean isRelativeURI(String uri) {
        try {
// BEGIN PATCH W. Randelshofer
            if (uri.length() == 0) return true;
// END PATCH W. Randelshofer
            return uri.charAt(0) != '/' && ! new URI(uri).isAbsolute();
        } catch (URISyntaxException e) {
            return false;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.