Java GZip File Check isGZipFile(File file)

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

Description

is G Zip File

License

Open Source License

Declaration

public static boolean isGZipFile(File file) 

Method Source Code

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

import java.io.*;

public class Main {
    public static boolean isGZipFile(File file) {
        boolean rv = false;
        if (file != null) {
            String fileName = file.getName();
            if (fileName != null) {
                if (fileName.toLowerCase().endsWith(".gz")) {
                    rv = true;// w  w  w  . ja v  a2s . c  o m
                }
            }
        }
        return rv;
    }
}

Related

  1. isGzip(File file)
  2. isGzip(String file)
  3. isGZipEnding(File file)
  4. isGzipFile(File f)
  5. isGzipFile(File file)
  6. isGZIPFileEmpty(File f)
  7. isGzipFilename(File file)
  8. isGzipped(File f)
  9. isGzipped(File file)