Interface Archive
- All Superinterfaces:
AutoCloseable
,Iterable<Archive.Entry>
- All Known Implementing Classes:
ExplodedArchive
,JarFileArchive
An archive that can be launched by the
Launcher
.- Since:
- 1.0.0
- Author:
- Phillip Webb
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents a single entry in the archive.static interface
Strategy interface to filterEntries
. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
close()
Closes theArchive
, releasing any open resources.Returns the manifest of the archive.getNestedArchives
(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) Returns nestedArchive
s for entries that match the specified filters.getUrl()
Returns a URL that can be used to load the archive.default boolean
Return if the archive is exploded (already unpacked).Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getUrl
Returns a URL that can be used to load the archive.- Returns:
- the archive URL
- Throws:
MalformedURLException
- if the URL is malformed
-
getManifest
Returns the manifest of the archive.- Returns:
- the manifest
- Throws:
IOException
- if the manifest cannot be read
-
getNestedArchives
Iterator<Archive> getNestedArchives(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) throws IOException Returns nestedArchive
s for entries that match the specified filters.- Parameters:
searchFilter
- filter used to limit when additional sub-entry searching is required ornull
if all entries should be considered.includeFilter
- filter used to determine which entries should be included in the result ornull
if all entries should be included- Returns:
- the nested archives
- Throws:
IOException
- on IO error- Since:
- 2.3.0
-
isExploded
default boolean isExploded()Return if the archive is exploded (already unpacked).- Returns:
- if the archive is exploded
- Since:
- 2.3.0
-
close
Closes theArchive
, releasing any open resources.- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
- if an error occurs during close processing- Since:
- 2.2.0
-