Package java.net

Examples of java.net.URI$Helper


      }
      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


            }
            // 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

           
            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

    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

  }
 
  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

      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

                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

    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

    @Override
    public File getConfigFile(Context ctx) {
        URL configUrl = ctx.getConfigFile();
        if (configUrl != null) {
            try {
                URI configUri = configUrl.toURI();
                if ("file".equals(configUri.getScheme())) {
                    return new File(configUri.getPath());
                }
            } catch (Exception ex) {
                logger.error("Could not convert URL to URI: " + configUrl, ex);
            }
        }
View Full Code Here

    public void writeExternal(ObjectOutput out) throws IOException {
        super.writeExternal(out);
        writeQuery(out);
        _fetchMethod.writeTo(out);

        final URI baseUri = _baseUri;
        final int fetchSize = _fetchSize;
        final float fetchGrow = _fetchGrow;
        final ShippedVariable[] varToShip = _varToShip;
        int frag = 0;
        if(baseUri != null) {
View Full Code Here

TOP

Related Classes of java.net.URI$Helper

Copyright © 2018 www.massapicom. 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.