Java URL Value Check isJar(URL url)

Here you can find the source of isJar(URL url)

Description

is Jar

License

Apache License

Declaration

public static boolean isJar(URL url) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.URL;

public class Main {
    public static boolean isJar(URL url) {
        if (url.getProtocol() != null && url.getProtocol().length() > 0) {
            if (url.getProtocol().equalsIgnoreCase("jar")) {
                return true;
            }//  w  w w .  ja v  a2  s  . co m
        }
        return url.getPath().endsWith(".jar");
    }
}

Related

  1. isHttpUrl(String in)
  2. isHttpUrl(URL url)
  3. isHttpUrl(URL url)
  4. isHttpURLAvailable(final String url)
  5. isInternetReachable(String url)
  6. isJarFile(URL url)
  7. isJarFile(URLConnection connection)
  8. isJarFileURL(URL url)
  9. isJarURL(URL url)