Examples of toURI()


Examples of java.io.File.toURI()

                    File file = new File(path);
                    if (!file.isAbsolute()) {
                        file = new File(basedir, path);
                    }
                    if (file.exists()) {
                        report.foundMatch(path, file.toURI().toURL());
                        continue;
                    }
                }
               
                // build URL, with support for classpath protocol
View Full Code Here

Examples of java.io.File.toURI()

                            {
                                ResourceWriter.instance().writeStringToFile(
                                    outputString,
                                    outputFile,
                                    this.getNamespace());
                                AndroMDALogger.info("Output: '" + outputFile.toURI() + "'");
                            }
                            else
                            {
                                if (this.getLogger().isDebugEnabled())
                                {
View Full Code Here

Examples of java.io.File.toURI()

                            }
                            else
                            {
                                if (this.getLogger().isDebugEnabled())
                                {
                                    this.getLogger().debug("Empty Output: '" + outputFile.toURI() + "' --> not writing");
                                }
                            }
                            AndroMDALogger.reset();
                        }
                    }
View Full Code Here

Examples of java.io.File.toURI()

                        if (!outputFile.exists() || resource.isOverwrite())
                        {
                            ResourceWriter.instance().writeUrlToFile(
                                resourceUrl,
                                outputFile.toString());
                            AndroMDALogger.info("Output: '" + outputFile.toURI() + "'");
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of java.io.File.toURI()

        throw new RegainException("Jar file does not exist: "
                + jarFile.getAbsolutePath());
      }

      try {
        classLoader = new URLClassLoader(new URL[]{jarFile.toURI().toURL()}, superClass.getClassLoader());
      } catch (MalformedURLException exc) {
        throw new RegainException("Creating class loader for "
                + "jar file failed: " + jarFile.getAbsolutePath(),
                exc);
      }
View Full Code Here

Examples of java.io.File.toURI()

            final File file = new File(directory, resourceName);
            if (file.exists())
            {
                try
                {
                    return file.toURI().toURL();
                }
                catch (final MalformedURLException exception)
                {
                    // - ignore, we just try to find the resource on the classpath
                }
View Full Code Here

Examples of java.io.File.toURI()

                    url = ResourceUtils.resolveClasspathResource(path);
                }
                else
                {
                    final File file = new File(path);
                    url = file.exists() ? file.toURI().toURL() : new URL(path);
                }
            }
            catch (MalformedURLException exception)
            {
                // ignore means no protocol was specified
View Full Code Here

Examples of java.io.File.toURI()

  public void testValidXml() {
    try {
      File webXml = new File("src/main/webapp/WEB-INF/web.xml");

      DocumentUtil.getDocument(webXml.toURI().toURL(), SchemaFactory.newInstance(
          XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema());
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
View Full Code Here

Examples of java.io.File.toURI()

                                {
                                    throw new AndroMDAppException("An error occured while processing template --> '" +
                                        path + "' with template context '" + this.templateContext + "'", throwable);
                                }
                                writer.flush();
                                this.printText(MARGIN + "Output: '" + outputFile.toURI().toURL() + "'");
                                ResourceWriter.instance().writeStringToFile(
                                    writer.toString(),
                                    outputFile);
                            }
                            processedResources.add(outputFile);
View Full Code Here

Examples of java.io.File.toURI()

                                if (write)
                                {
                                    ResourceWriter.instance().writeUrlToFile(
                                        resource,
                                        outputFile.toString());
                                    this.printText(MARGIN + "Output: '" + outputFile.toURI().toURL() + "'");
                                }
                                processedResources.add(outputFile);
                            }
                        }
                    }
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.