Package org.apache.commons.lang

Examples of org.apache.commons.lang.SystemUtils


     * @param file the file to be converted into an URL
     * @return URL
     * @throws java.net.MalformedURLException when error occurred
     */
    static URL toURL(File file) throws MalformedURLException {
        if (new SystemUtils().isJavaVersionAtLeast(JAVA_1_4)) {
            try {
                Method toURI = file.getClass().getMethod("toURI", (Class[]) null);
                Object uri = toURI.invoke(file, (Class[]) null);
                Method toURL = uri.getClass().getMethod("toURL", (Class[]) null);

View Full Code Here

TOP

Related Classes of org.apache.commons.lang.SystemUtils

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.