@Test public void testGetNames() throws FileNotFoundException, IOException { }
static public Set<String> getNames(InputStream is) throws IOException { Set<String> names = new HashSet<String>(); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (!entry.isDirectory()) names.add(entry.getName()); } zis.close(); return names; }
ArchiveParser { static public Set<String> getNames(InputStream is) throws IOException { Set<String> names = new HashSet<String>(); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (!entry.isDirectory()) names.add(entry.getName()); } zis.close(); return names; } }
ArchiveParser { static public Set<String> getNames(InputStream is) throws IOException { Set<String> names = new HashSet<String>(); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (!entry.isDirectory()) names.add(entry.getName()); } zis.close(); return names; }  }
ArchiveParser { static public Set<String> getNames(InputStream is) throws IOException { Set<String> names = new HashSet<String>(); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (!entry.isDirectory()) names.add(entry.getName()); } zis.close(); return names; }  static Set<String> getNames(InputStream is); static Set<String> getApacheNames(InputStream is); static InputStream getElementStream(InputStream is, String name); }
ArchiveParser { static public Set<String> getNames(InputStream is) throws IOException { Set<String> names = new HashSet<String>(); ZipInputStream zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { if (!entry.isDirectory()) names.add(entry.getName()); } zis.close(); return names; }  static Set<String> getNames(InputStream is); static Set<String> getApacheNames(InputStream is); static InputStream getElementStream(InputStream is, String name);  }