Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.osgi.util
Class FileIterator

java.lang.Object
  extended by org.nuxeo.osgi.util.FileIterator
All Implemented Interfaces:
Enumeration<File>, Iterator<File>

public class FileIterator
extends Object
implements Iterator<File>, Enumeration<File>

Author:
Bogdan Stefanescu

Constructor Summary
FileIterator(File file)
           
FileIterator(File file, FileFilter filter)
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileIterator

public FileIterator(File file)

FileIterator

public FileIterator(File file,
                    FileFilter filter)
Method Detail

asUrlIterator

public static Iterator<URL> asUrlIterator(Iterator<File> it)

asUrlEnumeration

public static Enumeration<URL> asUrlEnumeration(Iterator<File> it)

setSkipDirs

public void setSkipDirs(boolean skipDirs)

getSkipDirs

public boolean getSkipDirs()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<File>

next

public File next()
Specified by:
next in interface Iterator<File>

remove

public void remove()
Specified by:
remove in interface Iterator<File>

feed

public void feed(File file)
Feed the iterator with the given directory content if any

Parameters:
file -

hasMoreElements

public boolean hasMoreElements()
Enumeration API

Specified by:
hasMoreElements in interface Enumeration<File>

nextElement

public File nextElement()
Specified by:
nextElement in interface Enumeration<File>

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.