Java URL Value Check isJarURL(URL url)

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

Description

is Jar URL

License

Apache License

Declaration

public static boolean isJarURL(URL url) 

Method Source Code

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

import java.net.URL;

public class Main {
    public static boolean isJarURL(URL url) {
        String protocol = url.getProtocol();
        return "jar".equals(protocol) || "zip".equals(protocol) || "wsjar".equals(protocol)
                || "code-source".equals(protocol) && url.getPath().contains("!/");
    }/* w  w  w.j av  a 2 s .c  om*/
}

Related

  1. isJarFile(URL url)
  2. isJarFile(URLConnection connection)
  3. isJarFileURL(URL url)
  4. isJarURL(URL url)
  5. isJarURL(URL url)
  6. isJarURL(URL url)
  7. isJarURL(URL url)
  8. isJarURL(URL url)
  9. isJBoss5Url(URL fileUrl)