@Test public void testJarFile() throws IOException { File [] f = {new File("./src/test/resources/test.jar.extension")}; String [] s = {"eu/infomas/annotation"}; InputStream stream = new ClassFileIterator(f, s).next(); assertNotNull(stream); stream.close(); }
@Override public InputStream next() throws IOException { while (true) { if (zipIterator == null) { final File file = fileIterator.next(); if (file == null || !file.isFile()) { return null; } else { final String name = file.getName(); if (name.endsWith(".class")) { return new FileInputStream(file); } else if (fileIterator.isRootFile() && (endsWithIgnoreCase(name, ".jar") || isZipFile(file))) { zipIterator = new ZipFileIterator(new ZipFile(file), pkgNameFilter); } } } else { final InputStream is = zipIterator.next(); if (is == null) { zipIterator = null; } else { return is; } } } }
ClassFileIterator extends ResourceIterator { @Override public InputStream next() throws IOException { while (true) { if (zipIterator == null) { final File file = fileIterator.next(); if (file == null || !file.isFile()) { return null; } else { final String name = file.getName(); if (name.endsWith(".class")) { return new FileInputStream(file); } else if (fileIterator.isRootFile() && (endsWithIgnoreCase(name, ".jar") || isZipFile(file))) { zipIterator = new ZipFileIterator(new ZipFile(file), pkgNameFilter); } } } else { final InputStream is = zipIterator.next(); if (is == null) { zipIterator = null; } else { return is; } } } } }
ClassFileIterator extends ResourceIterator { @Override public InputStream next() throws IOException { while (true) { if (zipIterator == null) { final File file = fileIterator.next(); if (file == null || !file.isFile()) { return null; } else { final String name = file.getName(); if (name.endsWith(".class")) { return new FileInputStream(file); } else if (fileIterator.isRootFile() && (endsWithIgnoreCase(name, ".jar") || isZipFile(file))) { zipIterator = new ZipFileIterator(new ZipFile(file), pkgNameFilter); } } } else { final InputStream is = zipIterator.next(); if (is == null) { zipIterator = null; } else { return is; } } } } ClassFileIterator();  ClassFileIterator(final File[] filesOrDirectories, final String[] pkgNameFilter); }
ClassFileIterator extends ResourceIterator { @Override public InputStream next() throws IOException { while (true) { if (zipIterator == null) { final File file = fileIterator.next(); if (file == null || !file.isFile()) { return null; } else { final String name = file.getName(); if (name.endsWith(".class")) { return new FileInputStream(file); } else if (fileIterator.isRootFile() && (endsWithIgnoreCase(name, ".jar") || isZipFile(file))) { zipIterator = new ZipFileIterator(new ZipFile(file), pkgNameFilter); } } } else { final InputStream is = zipIterator.next(); if (is == null) { zipIterator = null; } else { return is; } } } } ClassFileIterator();  ClassFileIterator(final File[] filesOrDirectories, final String[] pkgNameFilter); String getName(); @Override InputStream next(); }
ClassFileIterator extends ResourceIterator { @Override public InputStream next() throws IOException { while (true) { if (zipIterator == null) { final File file = fileIterator.next(); if (file == null || !file.isFile()) { return null; } else { final String name = file.getName(); if (name.endsWith(".class")) { return new FileInputStream(file); } else if (fileIterator.isRootFile() && (endsWithIgnoreCase(name, ".jar") || isZipFile(file))) { zipIterator = new ZipFileIterator(new ZipFile(file), pkgNameFilter); } } } else { final InputStream is = zipIterator.next(); if (is == null) { zipIterator = null; } else { return is; } } } } ClassFileIterator();  ClassFileIterator(final File[] filesOrDirectories, final String[] pkgNameFilter); String getName(); @Override InputStream next();  }