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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a single entry in the archive.static interfaceStrategy interface to filterEntries. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Closes theArchive, releasing any open resources.Returns the manifest of the archive.getNestedArchives(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) Returns nestedArchives for entries that match the specified filters.getUrl()Returns a URL that can be used to load the archive.default booleanReturn 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 nestedArchives for entries that match the specified filters.- Parameters:
searchFilter- filter used to limit when additional sub-entry searching is required ornullif all entries should be considered.includeFilter- filter used to determine which entries should be included in the result ornullif 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:
closein interfaceAutoCloseable- Throws:
Exception- if an error occurs during close processing- Since:
- 2.2.0
-