Code example for ZipEntry

Methods: getName

0
     * @param entry 
     * 
     * @return the file name of a ZipEntry 
     */ 
    public static String getZipEntryFileName(final ZipEntry entry) {
        Guardian.assertNotNull("entry", entry);
        return getZipEntryFileName(entry.getName());
    } 
 
    /** 
     * @param entryName 
     * 
     * @return the fileName of a ZipEntry 
     */ 
    private static String getZipEntryFileName(final String entryName) {
        Guardian.assertNotNullOrEmpty("entryName", entryName);
        if (entryName.contains("/")) {
            return FileUtils.getFilenameWithoutExtension(entryName.substring(entryName.lastIndexOf("/") + 1));
        } 
        return (FileUtils.getFilenameWithoutExtension(entryName));