public class FileIterator extends Object implements Iterator<File>, Enumeration<File>
Modifier and Type | Field and Description |
---|---|
protected File |
file |
protected Queue<File> |
files |
protected FileFilter |
filter |
protected boolean |
skipDirs |
Constructor and Description |
---|
FileIterator(File file) |
FileIterator(File file,
FileFilter filter) |
Modifier and Type | Method and Description |
---|---|
static Enumeration<URL> |
asUrlEnumeration(Iterator<File> it) |
static Iterator<URL> |
asUrlIterator(Iterator<File> it) |
void |
feed(File file)
Feed the iterator with the given directory content if any
|
boolean |
getSkipDirs() |
boolean |
hasMoreElements()
Enumeration API
|
boolean |
hasNext() |
File |
next() |
File |
nextElement() |
void |
remove() |
void |
setSkipDirs(boolean skipDirs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected FileFilter filter
protected boolean skipDirs
public FileIterator(File file)
public FileIterator(File file, FileFilter filter)
public static Iterator<URL> asUrlIterator(Iterator<File> it)
public static Enumeration<URL> asUrlEnumeration(Iterator<File> it)
public void setSkipDirs(boolean skipDirs)
public boolean getSkipDirs()
public void feed(File file)
file
- public boolean hasMoreElements()
hasMoreElements
in interface Enumeration<File>
public File nextElement()
nextElement
in interface Enumeration<File>
Copyright © 2015 Nuxeo SA. All rights reserved.