Code example for ZipFile

Methods: closegetEntry

0
        } 
    } 
     
    public boolean isOOXML(File file) throws ZipException, IOException {
        try { 
            ZipFile zf = new ZipFile(file);
     
            try { 
                ZipEntry content = zf.getEntry("[Content_Types].xml");
                return content != null;
            } finally { 
                zf.close();
            } 
        } catch (Exception ex) {
            return false; 
        } 
    } 
 
    /** Break out the information in the given OOXML file, writing the text content to the provided Writer,  
     * and the properties into the given map. If out is null, the text won't be extracted. 
Stop searching for code, let great code find you!  Add Codota to your java IDE