Package java.net

Examples of java.net.URL


   private static String testArchiveDir;

   /** Deploy the given archive
    */
   public void deploy(String testName, String archive) throws Exception {
     URL archiveURL = getTestFile(testName, archive).toURL();
     getDeployer().deploy(archiveURL);
   }
View Full Code Here


   }

   /** Undeploy the given archive
    */
   public void undeploy(String testName, String archive) throws Exception {
       URL archiveURL = getTestFile(testName, archive).toURL();
       getDeployer().undeploy(archiveURL);
   }
View Full Code Here

   * Is it allowed to process this document ?
   * @param document
   * @return true if processing of this URL is allowed
   */
  protected boolean isProcessingAllowed(HttpDoc doc) {
    URL u = doc.getURL();
    if ((urlCheck != null) && (!urlCheck.checkURLForProcessing(u))) {
      log.debug("processing not allowed by URLCheck:" + u);
      return false;
    }
   
View Full Code Here

   * sets the start URL
   * @param the startURL as String
   */
  public void setStart(String startURL) {
    try {
      setStartURL(new URL(startURL));
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

   * Method getStart.
   * gets the start url as string
   * @return String
   */
  public String getStart() {
    URL url = getStartURL();
    if (url != null) {
      return url.toExternalForm();
    } else {
      return null;
    }
  }
View Full Code Here

  public URL removeWasteParameters(URL url) {
    String urlString = url.toExternalForm();
    String newUrlString = removeParametersFromString(urlString, wasteParameters);
    if (urlString != newUrlString) {
      try {
        url = new URL(newUrlString);
      } catch (MalformedURLException ex) {
        ex.printStackTrace();
      }
    };
    return url;
View Full Code Here

            delegate.undeploy(m_testName, archive);
         }

         if (archive.endsWith("-client.jar"))
         {
            URL archiveURL = getArchiveURL(archive);
            clientJars.add(archiveURL);
         }
      }

      ClassLoader parent = Thread.currentThread().getContextClassLoader();
View Full Code Here

         {
            String archive = archives[archives.length - i - 1];

            java.io.File file=delegate.getTestFile(m_testName, archive);
           
            URL archiveURL = file.toURL();
           
           java.io.File newfile=new java.io.File(file.getParentFile(), "_"+file.getName());
           file.renameTo(newfile);
          
           mapping.put(newfile, file);
View Full Code Here

        repURL = "http://weka.sourceforge.net/packageMetaData";
      } else {
        System.err.println("weka.core.WekaPackageRepositoryURL = " + repURL);
      }
     
      REP_URL = new URL(repURL);
      PACKAGE_MANAGER.setPackageRepositoryURL(REP_URL);
    } catch (MalformedURLException ex) {
      ex.printStackTrace();
    } catch (IOException ex) {
      ex.printStackTrace();
View Full Code Here

    try {
      PACKAGE_MANAGER.setPackageRepositoryURL(REP_URL);
      String numPackagesS = PACKAGE_MANAGER.getPackageRepositoryURL().toString()
      + "/numPackages.txt";
      URLConnection conn = null;
      URL connURL = new URL(numPackagesS);

      if (PACKAGE_MANAGER.setProxyAuthentication()) {
        conn = connURL.openConnection(PACKAGE_MANAGER.getProxy());
      } else {
        conn = connURL.openConnection();
      }
     
      conn.setConnectTimeout(30000); // timeout after 30 seconds
     
      BufferedReader bi =
View Full Code Here

TOP

Related Classes of java.net.URL

Copyright © 2015 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.