Here you can find the source of isZipFile(File f)
public static boolean isZipFile(File f)
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static boolean isZipFile(File f) { if (f != null) { if (f.getName().contains(".zip") || f.getAbsolutePath().contains(".zip")) { return true; }//from ww w. ja va 2 s .c o m } return false; } }