Package org.apache.openjpa.lib.meta
Class ZipStreamMetaDataIterator
java.lang.Object
org.apache.openjpa.lib.meta.ZipStreamMetaDataIterator
- All Implemented Interfaces:
MetaDataFilter.Resource
,MetaDataIterator
,Closeable
public class ZipStreamMetaDataIterator
extends Object
implements MetaDataIterator, MetaDataFilter.Resource
Iterator over all metadata resources in a given zip input stream.
- Author:
- Abe White
-
Constructor Summary
ConstructorDescriptionZipStreamMetaDataIterator
(ZipInputStream stream, MetaDataFilter filter) Constructor; supply zip stream and optional metadata filter. -
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
-
ZipStreamMetaDataIterator
Constructor; supply zip stream and optional metadata filter.
-
-
Method Details
-
hasNext
Description copied from interface:MetaDataIterator
Return whether there is another resource to iterate over.- Specified by:
hasNext
in interfaceMetaDataIterator
- Throws:
IOException
-
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
-
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
-
getName
Description copied from interface:MetaDataFilter.Resource
The name of the resource.- Specified by:
getName
in interfaceMetaDataFilter.Resource
-
getContent
Description copied from interface:MetaDataFilter.Resource
Resource content.- Specified by:
getContent
in interfaceMetaDataFilter.Resource
- Throws:
IOException
-