Class JarFileArchive
java.lang.Object
org.springframework.boot.loader.archive.JarFileArchive
- All Implemented Interfaces:
AutoCloseable,Iterable<Archive.Entry>,Archive
- Since:
- 1.0.0
- Author:
- Phillip Webb, Andy Wilkinson
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.boot.loader.archive.Archive
Archive.Entry, Archive.EntryFilter -
Constructor Summary
ConstructorsConstructorDescriptionJarFileArchive(File file) JarFileArchive(File file, URL url) JarFileArchive(JarFile jarFile) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes theArchive, releasing any open resources.Returns the manifest of the archive.protected ArchivegetNestedArchive(Archive.Entry entry) 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.iterator()Deprecated.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.boot.loader.archive.Archive
isExplodedMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JarFileArchive
- Throws:
IOException
-
JarFileArchive
- Throws:
IOException
-
JarFileArchive
-
-
Method Details
-
getUrl
Description copied from interface:ArchiveReturns a URL that can be used to load the archive.- Specified by:
getUrlin interfaceArchive- Returns:
- the archive URL
- Throws:
MalformedURLException- if the URL is malformed
-
getManifest
Description copied from interface:ArchiveReturns the manifest of the archive.- Specified by:
getManifestin interfaceArchive- Returns:
- the manifest
- Throws:
IOException- if the manifest cannot be read
-
getNestedArchives
public Iterator<Archive> getNestedArchives(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) throws IOException Description copied from interface:ArchiveReturns nestedArchives for entries that match the specified filters.- Specified by:
getNestedArchivesin interfaceArchive- 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
-
iterator
Deprecated.- Specified by:
iteratorin interfaceIterable<Archive.Entry>
-
close
Description copied from interface:ArchiveCloses theArchive, releasing any open resources.- Specified by:
closein interfaceArchive- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getNestedArchive
- Throws:
IOException
-
toString
-