Here you can find the source of isJarFile(URLConnection connection)
private static boolean isJarFile(URLConnection connection)
//package com.java2s; //License from project: Open Source License import java.net.URLConnection; public class Main { public static final String JAR_EXTENSION = ".jar"; private static boolean isJarFile(URLConnection connection) { return connection.getURL().toString().endsWith(JAR_EXTENSION); }/* w w w . jav a2s .co m*/ }