public class ZipFileMetaDataIterator extends java.lang.Object implements MetaDataIterator, MetaDataFilter.Resource
Constructor and Description |
---|
ZipFileMetaDataIterator(java.net.URL url,
MetaDataFilter filter)
Constructor; supply zip/jar URL and optional file filter.
|
ZipFileMetaDataIterator(java.util.zip.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.
|
java.io.File |
getFile()
Return the last-iterated metadata resource content as a file, or null
if not an extant file.
|
java.io.InputStream |
getInputStream()
Return the last-iterated metadata resource content as a stream.
|
java.lang.String |
getName()
The name of the resource.
|
boolean |
hasNext()
Return whether there is another resource to iterate over.
|
java.lang.String |
next()
Return the next metadata resource.
|
public ZipFileMetaDataIterator(java.net.URL url, MetaDataFilter filter) throws java.io.IOException
java.io.IOException
public ZipFileMetaDataIterator(java.util.zip.ZipFile file, MetaDataFilter filter)
public boolean hasNext() throws java.io.IOException
MetaDataIterator
hasNext
in interface MetaDataIterator
java.io.IOException
public java.lang.String next() throws java.io.IOException
MetaDataIterator
next
in interface MetaDataIterator
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
MetaDataIterator
getInputStream
in interface MetaDataIterator
java.io.IOException
public java.io.File getFile()
MetaDataIterator
getFile
in interface MetaDataIterator
public void close()
MetaDataIterator
close
in interface MetaDataIterator
close
in interface Closeable
public java.lang.String getName()
MetaDataFilter.Resource
getName
in interface MetaDataFilter.Resource
public byte[] getContent() throws java.io.IOException
MetaDataFilter.Resource
getContent
in interface MetaDataFilter.Resource
java.io.IOException