Java Zip File Check isZip(File file)

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

Description

is Zip

License

Apache License

Declaration

private static boolean isZip(File file) 

Method Source Code


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

import java.io.File;

public class Main {
    private static boolean isZip(File file) {
        return existsWithExtension(file, ".zip");
    }/*from ww w .ja v a  2s.  c  om*/

    private static boolean existsWithExtension(File file, String extension) {
        return file.isFile() && file.getName().toLowerCase().endsWith(extension);
    }
}

Related

  1. isZip(byte[] bytes)
  2. isZip(File candidate)
  3. isZip(File f)
  4. isZip(File file)
  5. isZip(File file)
  6. isZip(File file)
  7. isZip(File zip)
  8. isZip64EndOfCentralDirectoryLocatorPresent(RandomAccessFile zip, long zipEndOfCentralDirectoryPosition)
  9. isZipContainsEntry(File zip, String relativePath)