Interface ArchiveAdapter
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
AbstractAdapter,DirectoryArchive,InputStreamArchiveAdapter,JarArchive
public interface ArchiveAdapter extends java.io.Closeableadapter for reading archive style structure
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classArchiveAdapter.EntryDefinition of an archive entrystatic interfaceArchiveAdapter.EntryTaskdefines the notion of an archive entry task which is a task aimed to be run on particular archive entry.static interfaceArchiveAdapter.Selector
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.jar.ManifestgetManifest()Returns the manifest instance for the archive.java.net.URIgetURI()Returns the URI of the archivevoidonAllEntries(ArchiveAdapter.EntryTask task, java.util.logging.Logger logger)perform a task on each archive entryvoidonSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger)perform a task on selected archive entries
-
-
-
Method Detail
-
getURI
java.net.URI getURI()
Returns the URI of the archive- Returns:
- URI of the archive
-
getManifest
java.util.jar.Manifest getManifest() throws java.io.IOExceptionReturns the manifest instance for the archive.- Returns:
- the archive's manifest
- Throws:
java.io.IOException- if the manifest cannot be loaded.
-
onAllEntries
void onAllEntries(ArchiveAdapter.EntryTask task, java.util.logging.Logger logger) throws java.io.IOException
perform a task on each archive entry- Parameters:
task- the task to performlogger- for any logging activity- Throws:
java.io.IOException- can be generated while reading the archive entries
-
onSelectedEntries
void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, java.util.logging.Logger logger) throws java.io.IOException
perform a task on selected archive entries- Parameters:
selector- implementation to select the archive archive entries on which the task should be performed.task- the task to performlogger- for any logging activity- Throws:
java.io.IOException- can be generated while reading the archive entries
-
-