@Test public void files() throws FileSystemException { MatcherAssert.assertThat( new FileSystemOfJarFile("build/sample-tests.jar").files(), Matchers.hasItem(new FileSystemPathBase("org/tatools/testng/Test1.class"))); }
@Override public List<FileSystemPath> files() throws FileSystemException { try { List<FileSystemPath> data = new ArrayList<>(); ZipInputStream zip = new ZipInputStream(new FileInputStream(jarPath)); for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { data.add(new FileSystemPathBase(entry.getName())); } return data; } catch (IOException e) { throw new FileSystemException(e); } }
FileSystemOfJarFile implements FileSystem { @Override public List<FileSystemPath> files() throws FileSystemException { try { List<FileSystemPath> data = new ArrayList<>(); ZipInputStream zip = new ZipInputStream(new FileInputStream(jarPath)); for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { data.add(new FileSystemPathBase(entry.getName())); } return data; } catch (IOException e) { throw new FileSystemException(e); } } }
FileSystemOfJarFile implements FileSystem { @Override public List<FileSystemPath> files() throws FileSystemException { try { List<FileSystemPath> data = new ArrayList<>(); ZipInputStream zip = new ZipInputStream(new FileInputStream(jarPath)); for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { data.add(new FileSystemPathBase(entry.getName())); } return data; } catch (IOException e) { throw new FileSystemException(e); } } FileSystemOfJarFile(FileSystemPath jarPath);   FileSystemOfJarFile(String jarPath); }
FileSystemOfJarFile implements FileSystem { @Override public List<FileSystemPath> files() throws FileSystemException { try { List<FileSystemPath> data = new ArrayList<>(); ZipInputStream zip = new ZipInputStream(new FileInputStream(jarPath)); for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { data.add(new FileSystemPathBase(entry.getName())); } return data; } catch (IOException e) { throw new FileSystemException(e); } } FileSystemOfJarFile(FileSystemPath jarPath);   FileSystemOfJarFile(String jarPath); @Override List<FileSystemPath> files(); }
FileSystemOfJarFile implements FileSystem { @Override public List<FileSystemPath> files() throws FileSystemException { try { List<FileSystemPath> data = new ArrayList<>(); ZipInputStream zip = new ZipInputStream(new FileInputStream(jarPath)); for (ZipEntry entry = zip.getNextEntry(); entry != null; entry = zip.getNextEntry()) { data.add(new FileSystemPathBase(entry.getName())); } return data; } catch (IOException e) { throw new FileSystemException(e); } } FileSystemOfJarFile(FileSystemPath jarPath);   FileSystemOfJarFile(String jarPath); @Override List<FileSystemPath> files();  }