Java Zip File Check isZipFile(File file)

Here you can find the source of isZipFile(File file)

Description

is Zip File

License

Open Source License

Declaration

static boolean isZipFile(File file) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;
import java.util.zip.ZipInputStream;

public class Main {

    static boolean isZipFile(File file) throws IOException {
        return new ZipInputStream(new FileInputStream(file)).getNextEntry() != null;
    }/* w  w w .  j a  v  a 2  s . co  m*/
}

Related

  1. isZipFile(File f)
  2. isZipFile(File f)
  3. isZipFile(File f)
  4. isZipFile(File f)
  5. isZipFile(File f)
  6. isZipFile(File file)
  7. isZipFile(File file)
  8. isZipFile(File file)
  9. isZipFile(File file)