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. |
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.IOException
Copyright © 2012-2015. All Rights Reserved.