### Question:
ZipUtils { public static List<ZipEntry> searchInZip(InputStream ins, String suffix, boolean recursive) { try (BufferedInputStream bis = new BufferedInputStream(ins); ZipInputStream zis = new ZipInputStream(bis)) { List<ZipEntry> ret = new LinkedList<>(); ZipEntry ze; while ((ze = zis.getNextEntry()) != null) { if (!recursive && ze.getName().contains("/")) { continue; } if (StringUtils.isNotBlank(suffix) && !ze.getName().endsWith(suffix)) { continue; } ret.add(ze); } return ret; } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("Failed to search file entries in zip"); } }  static List<ZipEntry> searchInZip(InputStream ins, String suffix, boolean recursive); static void readFileInZip(InputStream ins, boolean recursive,
                                     Predicate<ZipEntry> predicate,
                                     ZipBuffer zipBuffer,
                                     OneFileCompleted oneFileCompleted); static void readFileInZip(InputStream ins, boolean recursive,
                                     Predicate<ZipEntry> predicate,
                                     ZipReader zipReader);  }### Answer:
@Test public void testSearchInZip() { try { InputStream inputStream = StringUtils.class.getProtectionDomain().getCodeSource().getLocation().openStream(); List<ZipEntry> zipEntries = ZipUtils.searchInZip(inputStream, ".properties", true); for (ZipEntry ze : zipEntries) { System.out.println(System.out.format("File: %s Size: %d Last Modified %s %n", ze.getName(), ze.getSize(), LocalDate.ofEpochDay(ze.getTime() / MILLS_IN_DAY))); } } catch (IOException e) { e.printStackTrace(); } }