public class ZipFileMetaDataIterator extends Object implements MetaDataIterator, MetaDataFilter.Resource
| Constructor and Description |
|---|
ZipFileMetaDataIterator(URL url,
MetaDataFilter filter)
Constructor; supply zip/jar URL and optional file filter.
|
ZipFileMetaDataIterator(ZipFile file,
MetaDataFilter filter)
Constructor; supply zip file and optional file filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the resources used by this iterator.
|
byte[] |
getContent()
Resource content.
|
File |
getFile()
Return the last-iterated metadata resource content as a file, or null
if not an extant file.
|
InputStream |
getInputStream()
Return the last-iterated metadata resource content as a stream.
|
String |
getName()
The name of the resource.
|
boolean |
hasNext()
Return whether there is another resource to iterate over.
|
String |
next()
Return the next metadata resource.
|
public ZipFileMetaDataIterator(URL url, MetaDataFilter filter) throws IOException
IOExceptionpublic ZipFileMetaDataIterator(ZipFile file, MetaDataFilter filter)
public boolean hasNext()
throws IOException
MetaDataIteratorhasNext in interface MetaDataIteratorIOExceptionpublic String next() throws IOException
MetaDataIteratornext in interface MetaDataIteratorIOExceptionpublic InputStream getInputStream() throws IOException
MetaDataIteratorgetInputStream in interface MetaDataIteratorIOExceptionpublic File getFile()
MetaDataIteratorgetFile in interface MetaDataIteratorpublic void close()
MetaDataIteratorclose in interface MetaDataIteratorclose in interface Closeablepublic String getName()
MetaDataFilter.ResourcegetName in interface MetaDataFilter.Resourcepublic byte[] getContent()
throws IOException
MetaDataFilter.ResourcegetContent in interface MetaDataFilter.ResourceIOExceptionCopyright © 2006–2020 Apache Software Foundation. All rights reserved.