Examples of toURI()


Examples of java.io.File.toURI()

            throws IOException {
       
        File parent = file.getAbsoluteFile().getParentFile();
        setDocument(
                loadDocument(file.toURI().toURL().toExternalForm()),
                (parent == null ? "" : parent.toURI().toURL().toExternalForm())
        );
    }

    public void setDocumentFromString(String content) {
        InputSource is = new InputSource(new BufferedReader(new StringReader(content)));
View Full Code Here

Examples of java.io.File.toURI()

        boolean debug = GradleWrapperMain.isDebug();
        File gradleJar = new File(gradleHome, "lib/gradle-launcher-" + version + ".jar");
        if (debug) {
            System.out.println("gradleJar = " + gradleJar.getAbsolutePath());
        }
        URLClassLoader contextClassLoader = new URLClassLoader(new URL[] { gradleJar.toURI().toURL() });
        Thread.currentThread().setContextClassLoader(contextClassLoader);
        Class<?> mainClass = contextClassLoader.loadClass("org.gradle.launcher.GradleMain");
        Method mainMethod = mainClass.getMethod("main", String[].class);
        mainMethod.invoke(null, new Object[] {args});
    }
View Full Code Here

Examples of java.io.File.toURI()

        String fname = fileName(file.getAbsolutePath());
        String sname = bindingFromFileName(fname);
       
        // construct and return the binding definition
        return loadBinding(fname, sname, new FileInputStream(file),
            file.toURI().toURL(), valid);
    }
}
View Full Code Here

Examples of java.io.File.toURI()

              xcode_adapter,
              provider_analysis,
              direct_input,
              job.getFile(),
              profile,
              output_file.toURI().toURL());
        }
       
        provider_job[0].setMaxBytesPerSecond( max_bytes_per_sec );
       
        TranscodeQueueListener listener =
View Full Code Here

Examples of java.io.File.toURI()

         
          File  file = input.getFile();
         
          if ( file.exists() && file.length() == input.getLength()){
           
            source_url = file.toURI().toURL();
          }
        }
       
        if ( source_url == null ){
       
View Full Code Here

Examples of java.io.File.toURI()

            } else {
                String path = m_rootPath;
                File pathfile = new File(path);
                if (pathfile.exists()) {
                    m_schemaDir = pathfile;
                    m_schemaRoot = pathfile.toURI().toURL();
                } else {
                    if (!path.endsWith("/")) {
                        path += '/';
                    }
                    m_schemaRoot = new URL(path);
View Full Code Here

Examples of java.io.File.toURI()

                String path = m_rootPath;
                File pathfile = new File(path).getCanonicalFile();
                if (pathfile.exists()) {
                    if (pathfile.isDirectory()) {
                        m_schemaDir = pathfile;
                        m_schemaRoot = pathfile.toURI().toURL();
                    } else {
                        System.out.println("Schema root path '" + m_rootPath + "' must be a directory");
                        alist.setValid(false);
                    }
                } else {
View Full Code Here

Examples of java.io.File.toURI()

                        File file = null;
                        if (ClasspathUrlExtender.isClasspathUrl(path)) {
                            url = ClasspathUrlExtender.buildURL(null, path);
                        } else {
                            file = new File(path);
                            url = file.toURI().toURL();
                        }
                        try {
                            BindingElement binding = processPregeneratedBinding(url, elemmap, typemap, handler);
                            if (!usenns) {
                                usenns = checkNoNamespace(binding);
View Full Code Here

Examples of java.io.File.toURI()

       
        // validate the root binding (which will pull in all referenced bindings)
        File file = new File(dir, root.getFileName());
        ValidationContext vctx = new ValidationContext(loc);
        FileInputStream is = new FileInputStream(file);
        BindingElement binding = BindingElement.validateBinding(root.getFileName(), file.toURI().toURL(), is, vctx);
        if (binding == null || vctx.getErrorCount() > 0 || vctx.getFatalCount() > 0) {
            return null;
        } else {
           
            // build and return list of validated binding definitions
View Full Code Here

Examples of java.io.File.toURI()

                        errors.add("No files found matching command line pattern '" + pattern +
                            "' in directory " + dir.getAbsolutePath());
                    } else {
                        for (int i = 0; i < matches.length; i++) {
                            String match = matches[i];
                            report.foundMatch(match, new URL(dir.toURI().toURL(), match));
                        }
                    }
                }
            } else {
               
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.