Here you can find the source of isUrlInJar(URL url)
Parameter | Description |
---|---|
url | The path to inspect. |
Parameter | Description |
---|---|
IOException | an exception |
public static boolean isUrlInJar(URL url) throws IOException
//package com.java2s; import java.io.IOException; import java.net.URL; public class Main { /**/* ww w.j av a 2s.c o m*/ * @param url The path to inspect. * @return TRUE if the passed URL is contained in a JAR file. * @throws IOException */ public static boolean isUrlInJar(URL url) throws IOException { return url == null ? false : url.toString().startsWith("jar:"); } }