Package org.apache.openjpa.lib.meta
Class FileMetaDataIterator
java.lang.Object
org.apache.openjpa.lib.meta.FileMetaDataIterator
- All Implemented Interfaces:
MetaDataIterator
,Closeable
Iterator over a file, or over all metadata resources below a given directory.
- Author:
- Abe White
-
Constructor Summary
ConstructorDescriptionFileMetaDataIterator
(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
Modifier and TypeMethodDescriptionvoid
close()
Close the resources used by this iterator.getFile()
Return the last-iterated metadata resource content as a file, or null if not an extant file.Return the last-iterated metadata resource content as a stream.boolean
hasNext()
Return whether there is another resource to iterate over.next()
Return the next metadata resource.
-
Constructor Details
-
FileMetaDataIterator
Constructor; supply metadata file. -
FileMetaDataIterator
Constructor; supply root of directory tree to search and optional file filter.- Throws:
IOException
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:MetaDataIterator
Return whether there is another resource to iterate over.- Specified by:
hasNext
in interfaceMetaDataIterator
-
next
Description copied from interface:MetaDataIterator
Return the next metadata resource.- Specified by:
next
in interfaceMetaDataIterator
- Throws:
IOException
-
getInputStream
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a stream.- Specified by:
getInputStream
in interfaceMetaDataIterator
- Throws:
IOException
-
getFile
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
getFile
in interfaceMetaDataIterator
-
close
public void close()Description copied from interface:MetaDataIterator
Close the resources used by this iterator.- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceMetaDataIterator
-