Here you can find the source of getFileNameFromZipEntry(ZipEntry entry)
private static String getFileNameFromZipEntry(ZipEntry entry)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.zip.ZipEntry; public class Main { private static String getFileNameFromZipEntry(ZipEntry entry) { String fileName = entry.getName(); int idx;//from www.j a v a 2 s. c o m if ((idx = fileName.lastIndexOf("/")) > -1 || (idx = fileName.lastIndexOf(File.separator)) > -1) { fileName = fileName.substring(idx + 1); } return fileName; } }