Package org.apache.openjpa.lib.meta
Class JarFileURLMetaDataIterator
java.lang.Object
org.apache.openjpa.lib.meta.JarFileURLMetaDataIterator
- All Implemented Interfaces:
MetaDataFilter.Resource
,MetaDataIterator
,Closeable
public class JarFileURLMetaDataIterator
extends Object
implements MetaDataIterator, MetaDataFilter.Resource
Iterator over all metadata resources in a given resource addressed by a jar:file URL.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the resources used by this iterator.byte[]
Resource content.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.getName()
The name of the resource.boolean
hasNext()
Return whether there is another resource to iterate over.next()
Return the next metadata resource.
-
Constructor Details
-
JarFileURLMetaDataIterator
- Throws:
IOException
-
-
Method Details
-
hasNext
Return whether there is another resource to iterate over.- Specified by:
hasNext
in interfaceMetaDataIterator
- Throws:
IOException
-
next
Return the next metadata resource.- Specified by:
next
in interfaceMetaDataIterator
- Throws:
IOException
-
getInputStream
Return the last-iterated metadata resource content as a stream.- Specified by:
getInputStream
in interfaceMetaDataIterator
- Throws:
IOException
-
getFile
Return the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
getFile
in interfaceMetaDataIterator
- Throws:
IOException
-
close
public void close()Close the resources used by this iterator.- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceMetaDataIterator
-
getName
The name of the resource.- Specified by:
getName
in interfaceMetaDataFilter.Resource
-
getContent
Resource content.- Specified by:
getContent
in interfaceMetaDataFilter.Resource
- Throws:
IOException
-