Here you can find the source of isZipped(File file)
private static boolean isZipped(File file)
//package com.java2s; //License from project: BSD License import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.zip.ZipInputStream; public class Main { private static boolean isZipped(File file) { try {// ww w.j av a2s. com return new ZipInputStream(new FileInputStream(file)).getNextEntry() != null; } catch (IOException e) { return false; } } }