Examples of toURI()


Examples of java.io.File.toURI()

            final String directoryPath = ((String)directoryIterator.next()).trim();
            final File directory = new File(rootDirectory, directoryPath);
            if (this.isWriteable(directoryPath))
            {
                directory.mkdirs();
                this.printText(MARGIN + "Output: '" + directory.toURI().toURL() + "'");
            }
        }

        if (write)
        {
View Full Code Here

Examples of java.io.File.toURI()

                {
                    throw new AndroMDAppException("No instructions are available at --> '" + instructions +
                        "', please make sure you have the correct instructions defined in your descriptor --> '" +
                        this.resource + "'");
                }
                this.printText(MARGIN + "Instructions for your new application --> '" + instructions.toURI().toURL() + "'");
            }
            this.printLine();
        }
        return processedResources;
    }
View Full Code Here

Examples of java.io.File.toURI()

                final File file = new File((String)classpathFiles.get(ctr));
                if (this.getLog().isDebugEnabled())
                {
                    getLog().debug("adding to classpath '" + file + "'");
                }
                classpathUrls.add(file.toURI().toURL());
            }
        }
        final URLClassLoader loader =
            new URLClassLoader((URL[])classpathUrls.toArray(new URL[0]),
                Thread.currentThread().getContextClassLoader());
View Full Code Here

Examples of java.io.File.toURI()

                    Message msg = new Message("FILE_OPEN_ERROR_EXC", LOG, location);
                    throw new ConfigurationException(msg);
                }
                File file = new File(path);
                if (file.exists()) {
                    return new InputSource(file.toURI().toString());
                }
            } else {
                //TODO - other protocols like HTTP?               
            }
        }
View Full Code Here

Examples of java.io.File.toURI()

    File dataDir = store.getDataDir();
    if (dataDir == null) {
      return null;
    }
    try {
      return dataDir.toURI().toURL();
    }
    catch (MalformedURLException e) {
      logger.warn(e.toString(), e);
      return null;
    }
View Full Code Here

Examples of java.io.File.toURI()

    File dataDir = store.getDataDir();
    if (dataDir == null) {
      return null;
    }
    try {
      return dataDir.toURI().toURL();
    }
    catch (MalformedURLException e) {
      logger.warn(e.toString(), e);
      return null;
    }
View Full Code Here

Examples of java.io.File.toURI()

                final File file = new File((String)files.get(ctr));
                if (this.getLog().isDebugEnabled())
                {
                    getLog().debug("adding to classpath '" + file + "'");
                }
                classpathUrls[ctr] = file.toURI().toURL();
            }

            final URLClassLoader loader =
                new URLClassLoader(classpathUrls,
                    Thread.currentThread().getContextClassLoader());
View Full Code Here

Examples of java.net.URL.toURI()

            }
            // 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.URL.toURI()

   */

   public void testURLRss() throws Exception
   {
      URL url = new URL("http://itredux.com/blog/feed/atom/");
      RSSDocument<DefaultRSSChannel, DefaultRSSItem> document = parser_.createDocument(url.toURI(), "utf-8");
      if (document != null)
      {
         List<DefaultRSSItem> items = document.getItems();
         for (DefaultRSSItem item : items)
         {
View Full Code Here

Examples of java.net.URL.toURI()

    */

   public void testRssChannelLink() throws Exception
   {
      URL url = new URL("http://www.lagazettedescommunes.com/RSS/generateRSS.asp");
      RSSDocument<DefaultRSSChannel, DefaultRSSItem> document = parser_.createDocument(url.toURI(), "utf-8");
      if (document != null)
      {
         IRSSChannel channel = document.getChannel();
         System.out.println("RSS Channel Title: " + channel.getTitle());
         System.out.println("RSS Channel Link: " + channel.getLink());
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.