Java GZip File Check isGzipped(File file)

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

Description

Returns true if file has a .gz extension

License

Open Source License

Parameter

Parameter Description
file a parameter

Declaration

public static boolean isGzipped(File file) 

Method Source Code

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

import java.io.File;

public class Main {
    /**/*from   ww w .  j  a  v  a 2s.com*/
     * Returns true if file has a .gz extension 
     * @param file
     * @return
     */
    public static boolean isGzipped(File file) {
        return file.getName().endsWith(".gz");
    }
}

Related

  1. isGZipFile(File file)
  2. isGzipFile(File file)
  3. isGZIPFileEmpty(File f)
  4. isGzipFilename(File file)
  5. isGzipped(File f)
  6. isGZipped(final File f)
  7. isGzipped(final File file)
  8. isGZipped(final File file)
  9. isGzipped(String fileName)