public final class JarFileScanner extends AbstractResourceFinderAdapter
Modifier and Type | Field and Description |
---|---|
private static char |
JAR_FILE_SEPARATOR |
private java.util.jar.JarInputStream |
jarInputStream |
private static java.util.logging.Logger |
LOGGER |
private java.util.jar.JarEntry |
next |
private java.lang.String |
parent |
private boolean |
recursive |
Constructor and Description |
---|
JarFileScanner(java.io.InputStream inputStream,
java.lang.String parent,
boolean recursive)
Create new JAR file scanner.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Default implementation of
#close() which does nothing. |
boolean |
hasNext() |
java.lang.String |
next() |
java.io.InputStream |
open()
Open current resource.
|
void |
reset()
Reset the
ResourceFinder instance. |
remove
private static final java.util.logging.Logger LOGGER
private static final char JAR_FILE_SEPARATOR
private final java.util.jar.JarInputStream jarInputStream
private final java.lang.String parent
private final boolean recursive
private java.util.jar.JarEntry next
public JarFileScanner(java.io.InputStream inputStream, java.lang.String parent, boolean recursive) throws java.io.IOException
inputStream
- JAR file input streamparent
- JAR file entry prefix.recursive
- if (true
the packages will be scanned recursively together with any nested packages, if
false
only the explicitly listed packages will be scanned.java.io.IOException
- if wrapping given input stream into JarInputStream
failed.public boolean hasNext()
public java.lang.String next()
public void reset()
ResourceFinder
ResourceFinder
instance.
Upon calling this method the implementing class MUST reset its internal state to the initial state.public java.io.InputStream open()
ResourceFinder
public void close()
AbstractResourceFinderAdapter
#close()
which does nothing.close
in interface java.lang.AutoCloseable
close
in interface ResourceFinder
close
in class AbstractResourceFinderAdapter