Package org.apache.openjpa.lib.meta
Class MetaDataIteratorChain
- java.lang.Object
-
- org.apache.openjpa.lib.meta.MetaDataIteratorChain
-
- All Implemented Interfaces:
MetaDataIterator
,Closeable
- Direct Known Subclasses:
ClasspathMetaDataIterator
public class MetaDataIteratorChain extends java.lang.Object implements MetaDataIterator
Metadata iterator that combines several iterators.- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description MetaDataIteratorChain()
Default constructor.MetaDataIteratorChain(MetaDataIterator itr1, MetaDataIterator itr2)
Combine two iterators.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIterator(MetaDataIterator itr)
Add an iterator to the chain.void
close()
Close the resources used by this iterator.java.io.File
getFile()
Return the last-iterated metadata resource content as a file, or null if not an extant file.java.io.InputStream
getInputStream()
Return the last-iterated metadata resource content as a stream.boolean
hasNext()
Return whether there is another resource to iterate over.java.lang.Object
next()
Return the next metadata resource.
-
-
-
Constructor Detail
-
MetaDataIteratorChain
public MetaDataIteratorChain()
Default constructor.
-
MetaDataIteratorChain
public MetaDataIteratorChain(MetaDataIterator itr1, MetaDataIterator itr2)
Combine two iterators.
-
-
Method Detail
-
addIterator
public void addIterator(MetaDataIterator itr)
Add an iterator to the chain.
-
hasNext
public boolean hasNext() throws java.io.IOException
Description copied from interface:MetaDataIterator
Return whether there is another resource to iterate over.- Specified by:
hasNext
in interfaceMetaDataIterator
- Throws:
java.io.IOException
-
next
public java.lang.Object next() throws java.io.IOException
Description copied from interface:MetaDataIterator
Return the next metadata resource.- Specified by:
next
in interfaceMetaDataIterator
- Throws:
java.io.IOException
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
Description copied from interface:MetaDataIterator
Return the last-iterated metadata resource content as a stream.- Specified by:
getInputStream
in interfaceMetaDataIterator
- Throws:
java.io.IOException
-
getFile
public java.io.File getFile() throws java.io.IOException
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
- Throws:
java.io.IOException
-
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
-
-