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 java.lang.Object implements MetaDataIterator, MetaDataFilter.Resource
Iterator over all metadata resources in a given resource addressed by a jar:file URL.
-
-
Constructor Summary
Constructors Constructor Description JarFileURLMetaDataIterator(java.net.URL url, MetaDataFilter filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the resources used by this iterator.byte[]getContent()Resource content.java.io.FilegetFile()Return the last-iterated metadata resource content as a file, or null if not an extant file.java.io.InputStreamgetInputStream()Return the last-iterated metadata resource content as a stream.java.lang.StringgetName()The name of the resource.booleanhasNext()Return whether there is another resource to iterate over.java.lang.Objectnext()Return the next metadata resource.
-
-
-
Constructor Detail
-
JarFileURLMetaDataIterator
public JarFileURLMetaDataIterator(java.net.URL url, MetaDataFilter filter) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
hasNext
public boolean hasNext() throws java.io.IOExceptionReturn whether there is another resource to iterate over.- Specified by:
hasNextin interfaceMetaDataIterator- Throws:
java.io.IOException
-
next
public java.lang.Object next() throws java.io.IOExceptionReturn the next metadata resource.- Specified by:
nextin interfaceMetaDataIterator- Throws:
java.io.IOException
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionReturn the last-iterated metadata resource content as a stream.- Specified by:
getInputStreamin interfaceMetaDataIterator- Throws:
java.io.IOException
-
getFile
public java.io.File getFile() throws java.io.IOExceptionReturn the last-iterated metadata resource content as a file, or null if not an extant file.- Specified by:
getFilein interfaceMetaDataIterator- Throws:
java.io.IOException
-
close
public void close()
Close the resources used by this iterator.- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceMetaDataIterator
-
getName
public java.lang.String getName()
The name of the resource.- Specified by:
getNamein interfaceMetaDataFilter.Resource
-
getContent
public byte[] getContent() throws java.io.IOExceptionResource content.- Specified by:
getContentin interfaceMetaDataFilter.Resource- Throws:
java.io.IOException
-
-