exense-basic-commons/src/main/java/ch/exense/commons/io/FileHelper.java
/**
	 * Check whether the provided file is an archive
	 * @return the check result
	 */
Check whether the provided file is an archive
@return the check result
Check whether the provided file is an archive @return the check result
public static boolean isArchive(File f) {
	    int fileSignature = 0;
	    try (RandomAccessFile raf = new RandomAccessFile(f, "r")) {
	        fileSignature = raf.readInt();
	    } catch (IOException e) {
	    }
	    return fileSignature == 0x504B0304 || fileSignature == 0x504B0506 || fileSignature == 0x504B0708;
	}
public static boolean isArchive ( File f ) { int fileSignature = 0 ; try ( RandomAccessFile raf = new RandomAccessFile ( f , "r" ) ) { fileSignature = raf . readInt ( ) ; } catch ( IOException e ) { } return fileSignature == 0x504B0304 || fileSignature == 0x504B0506 || fileSignature == 0x504B0708 ; }
Check whether the provided file is an archive
 @return the check result
Check whether the provided file is an archive @return the check result
// handle if you like