(File tpFile, String[] prefixes, String[] suffixes)
| 164 | } |
| 165 | |
| 166 | private static String[] collectFilesZIP(File tpFile, String[] prefixes, String[] suffixes) |
| 167 | { |
| 168 | List list = new ArrayList(); |
| 169 | String s = "assets/minecraft/"; |
| 170 | |
| 171 | try |
| 172 | { |
| 173 | ZipFile zipfile = new ZipFile(tpFile); |
| 174 | Enumeration enumeration = zipfile.entries(); |
| 175 | |
| 176 | while (enumeration.hasMoreElements()) |
| 177 | { |
| 178 | ZipEntry zipentry = (ZipEntry)enumeration.nextElement(); |
| 179 | String s1 = zipentry.getName(); |
| 180 | |
| 181 | if (s1.startsWith(s)) |
| 182 | { |
| 183 | s1 = s1.substring(s.length()); |
| 184 | |
| 185 | if (StrUtils.startsWith(s1, prefixes) && StrUtils.endsWith(s1, suffixes)) |
| 186 | { |
| 187 | list.add(s1); |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | zipfile.close(); |
| 193 | String[] astring = (String[])((String[])list.toArray(new String[list.size()])); |
| 194 | return astring; |
| 195 | } |
| 196 | catch (IOException ioexception) |
| 197 | { |
| 198 | ioexception.printStackTrace(); |
| 199 | return new String[0]; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | private static boolean isLowercase(String str) |
| 204 | { |
no test coverage detected