Here you can find the source of isZipEntryPackage(String str)
public static boolean isZipEntryPackage(String str)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean isZipEntryPackage(String str) { if (str.length() < 18) return false; String t = cleanPath(str); String tmp = t.substring(0, 18); String test = "replicate" + File.separator + "inbound" + File.separator; if (tmp.equals(test)) { // Check for zip file tmp = str.substring(str.length() - 4, str.length()); if (tmp.equals(".zip")) return true; else/* w w w.j a va 2s . c om*/ return false; } else return false; } /** * cleanPath static method replaces all path separators with system dependednt value. * For UNIX it is / for Windows - "\\" * @param path - string with directory/file path * @return String path with system related path separators */ public static String cleanPath(String path) { String str = path.replace('/', File.separatorChar); String final_str = str.replace('\\', File.separatorChar); return final_str; } }