Java Zip File Check isZip(File candidate)

Here you can find the source of isZip(File candidate)

Description

Checks if is zip (extension == zip).

License

Apache License

Parameter

Parameter Description
candidate the candidate

Return

true, if is zip

Declaration

public static boolean isZip(File candidate) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    /**/*from   w w  w.j  a v a2s.  c  om*/
     * Checks if is zip (extension == zip).
     *
     * @param candidate the candidate
     * @return true, if is zip
     */
    public static boolean isZip(File candidate) {
        return candidate.getName().toLowerCase().endsWith(".zip");
    }
}

Related

  1. isZip(BufferedInputStream in)
  2. isZip(byte[] bytes)
  3. isZip(File f)
  4. isZip(File file)
  5. isZip(File file)
  6. isZip(File file)