public class JarArchive extends AbstractAdapter
ArchiveAdapter.Entry, ArchiveAdapter.EntryTask, ArchiveAdapter.Selector
Modifier and Type | Field and Description |
---|---|
private java.util.jar.JarFile |
jar |
private Parser |
parser |
private java.util.concurrent.atomic.AtomicInteger |
releaseCount
We need to maintain how many internal jars got opened so that
we don't close our jar archive until all the sub scanning
has been done successfully.
|
private java.net.URI |
uri |
Constructor and Description |
---|
JarArchive(Parser parser,
java.net.URI uri) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.util.jar.Manifest |
getManifest()
Returns the manifest instance for the archive.
|
java.net.URI |
getURI()
Returns the URI of the archive
|
void |
onSelectedEntries(ArchiveAdapter.Selector selector,
ArchiveAdapter.EntryTask task,
java.util.logging.Logger logger)
perform a task on selected archive entries
|
(package private) void |
releaseCount() |
onAllEntries
private final Parser parser
private final java.util.jar.JarFile jar
private final java.net.URI uri
private final java.util.concurrent.atomic.AtomicInteger releaseCount
public JarArchive(Parser parser, java.net.URI uri) throws java.io.IOException
java.io.IOException
public java.net.URI getURI()
ArchiveAdapter
public void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger) throws java.io.IOException
ArchiveAdapter
selector
- implementation to select the archive archive entries on
which the task should be performed.task
- the task to performlogger
- for any logging activityjava.io.IOException
- can be generated while reading the archive entriespublic java.util.jar.Manifest getManifest() throws java.io.IOException
ArchiveAdapter
java.io.IOException
- if the manifest cannot be loaded.public void close() throws java.io.IOException
java.io.IOException
void releaseCount() throws java.io.IOException
java.io.IOException