Interface Archive
- All Superinterfaces:
- AutoCloseable
An archive that can be launched by the 
Launcher.- Since:
- 3.2.0
- Author:
- Phillip Webb
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a single entry in the archive.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Predicate<Archive.Entry>Predicate that accepts all entries.
- 
Method SummaryModifier and TypeMethodDescriptiondefault voidclose()Closes theArchive, releasing any open resources.static Archivestatic Archivestatic Archivecreate(ProtectionDomain protectionDomain) getClassPathUrls(Predicate<Archive.Entry> includeFilter) Returns classpath URLs for the archive that match the specified filter.getClassPathUrls(Predicate<Archive.Entry> includeFilter, Predicate<Archive.Entry> directorySearchFilter) Returns classpath URLs for the archive that match the specified filters.Returns the manifest of the archive.default FileReturns the root directory of this archive ornullif the archive is not backed by a directory.default booleanReturns if this archive is backed by an exploded archive directory.
- 
Field Details- 
ALL_ENTRIESPredicate that accepts all entries.
 
- 
- 
Method Details- 
getManifestReturns the manifest of the archive.- Returns:
- the manifest or null
- Throws:
- IOException- if the manifest cannot be read
 
- 
getClassPathUrlsReturns classpath URLs for the archive that match the specified filter.- Parameters:
- includeFilter- filter used to determine which entries should be included.
- Returns:
- the classpath URLs
- Throws:
- IOException- on IO error
 
- 
getClassPathUrlsSet<URL> getClassPathUrls(Predicate<Archive.Entry> includeFilter, Predicate<Archive.Entry> directorySearchFilter) throws IOException Returns classpath URLs for the archive that match the specified filters.- Parameters:
- includeFilter- filter used to determine which entries should be included
- directorySearchFilter- filter used to optimize tree walking for exploded archives by determining if a directory needs to be searched or not
- Returns:
- the classpath URLs
- Throws:
- IOException- on IO error
 
- 
isExplodeddefault boolean isExploded()Returns if this archive is backed by an exploded archive directory.- Returns:
- if the archive is exploded
 
- 
getRootDirectoryReturns the root directory of this archive ornullif the archive is not backed by a directory.- Returns:
- the root directory
 
- 
closeCloses theArchive, releasing any open resources.- Specified by:
- closein interface- AutoCloseable
- Throws:
- Exception- if an error occurs during close processing
 
- 
create
- 
create- Throws:
- Exception
 
- 
create
 
-