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