public final class InputStreamIterator extends Object
FileIterator enables iteration over all files in a directory and all
its sub directories.
FileIterator iter = new FileIterator(new File("./src"));
File f;
while ((f = iter.next()) != null) {
// do something with f
assert f == iter.getCurrent();
}
| Constructor and Description |
|---|
InputStreamIterator(InputStream... filesOrDirectories)
Create a new
FileIterator using the specified 'filesOrDirectories' as root. |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
next()
Return the next
File object or null if no more files are
available. |
public InputStreamIterator(InputStream... filesOrDirectories)
FileIterator using the specified 'filesOrDirectories' as root.
filesOrDirectories - Zero or more File objects, which are iterated
in the specified order (depth first)public InputStream next() throws IOException
File object or null if no more files are
available.IOExceptionCopyright © 2016. All rights reserved.