@Test(expected = FileSystemException.class) public void incorrectPath() throws FileSystemException { new FileSystemOfJarFile("faffasfas").files(); }
@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();  }