Class JarFileArchive
- java.lang.Object
-
- fish.payara.micro.boot.loader.archive.JarFileArchive
-
- All Implemented Interfaces:
Archive,Iterable<Archive.Entry>
public class JarFileArchive extends Object implements Archive
- Author:
- Phillip Webb, Andy Wilkinson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface fish.payara.micro.boot.loader.archive.Archive
Archive.Entry, Archive.EntryFilter
-
-
Constructor Summary
Constructors Constructor Description JarFileArchive(JarFile jarFile)JarFileArchive(File file)JarFileArchive(File file, URL url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManifestgetManifest()Returns the manifest of the archive.protected ArchivegetNestedArchive(Archive.Entry entry)List<Archive>getNestedArchives(Archive.EntryFilter filter)Returns nestedArchives for entries that match the specified filter.URLgetUrl()Returns a URL that can be used to load the archive.Iterator<Archive.Entry>iterator()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
JarFileArchive
public JarFileArchive(File file) throws IOException
- Throws:
IOException
-
JarFileArchive
public JarFileArchive(File file, URL url) throws IOException
- Throws:
IOException
-
JarFileArchive
public JarFileArchive(JarFile jarFile)
-
-
Method Detail
-
getUrl
public URL getUrl() throws MalformedURLException
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
public Manifest getManifest() throws IOException
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 List<Archive> getNestedArchives(Archive.EntryFilter filter) throws IOException
Description copied from interface:ArchiveReturns nestedArchives for entries that match the specified filter.- Specified by:
getNestedArchivesin interfaceArchive- Parameters:
filter- the filter used to limit entries- Returns:
- nested archives
- Throws:
IOException- if nested archives cannot be read
-
iterator
public Iterator<Archive.Entry> iterator()
- Specified by:
iteratorin interfaceIterable<Archive.Entry>
-
getNestedArchive
protected Archive getNestedArchive(Archive.Entry entry) throws IOException
- Throws:
IOException
-
-