Package org.apache.openjpa.lib.meta
Class FileMetaDataIterator
- java.lang.Object
 - 
- org.apache.openjpa.lib.meta.FileMetaDataIterator
 
 
- 
- All Implemented Interfaces:
 MetaDataIterator,Closeable
public class FileMetaDataIterator extends Object implements MetaDataIterator
Iterator over a file, or over all metadata resources below a given directory.- Author:
 - Abe White
 
 
- 
- 
Constructor Summary
Constructors Constructor Description FileMetaDataIterator(File file)Constructor; supply metadata file.FileMetaDataIterator(File dir, MetaDataFilter filter)Constructor; supply root of directory tree to search and optional file filter. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the resources used by this iterator.FilegetFile()Return the last-iterated metadata resource content as a file, or null if not an extant file.InputStreamgetInputStream()Return the last-iterated metadata resource content as a stream.booleanhasNext()Return whether there is another resource to iterate over.URLnext()Return the next metadata resource. 
 - 
 
- 
- 
Constructor Detail
- 
FileMetaDataIterator
public FileMetaDataIterator(File file)
Constructor; supply metadata file. 
- 
FileMetaDataIterator
public FileMetaDataIterator(File dir, MetaDataFilter filter) throws IOException
Constructor; supply root of directory tree to search and optional file filter.- Throws:
 IOException
 
 - 
 
- 
Method Detail
- 
hasNext
public boolean hasNext()
Description copied from interface:MetaDataIteratorReturn whether there is another resource to iterate over.- Specified by:
 hasNextin interfaceMetaDataIterator
 
- 
next
public URL next() throws IOException
Description copied from interface:MetaDataIteratorReturn the next metadata resource.- Specified by:
 nextin interfaceMetaDataIterator- Throws:
 IOException
 
- 
getInputStream
public InputStream getInputStream() throws IOException
Description copied from interface:MetaDataIteratorReturn the last-iterated metadata resource content as a stream.- Specified by:
 getInputStreamin interfaceMetaDataIterator- Throws:
 IOException
 
- 
getFile
public File getFile()
Description copied from interface:MetaDataIteratorReturn the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
 getFilein interfaceMetaDataIterator
 
- 
close
public void close()
Description copied from interface:MetaDataIteratorClose the resources used by this iterator.- Specified by:
 closein interfaceCloseable- Specified by:
 closein interfaceMetaDataIterator
 
 - 
 
 -