public class JarFileArchive extends Archive
Archive.Entry, Archive.EntryFilter, Archive.EntryRenameFilter
Constructor and Description |
---|
JarFileArchive(File file) |
JarFileArchive(File file,
URL url) |
JarFileArchive(JarFile jarFile) |
Modifier and Type | Method and Description |
---|---|
Collection<Archive.Entry> |
getEntries()
Returns all entries from the archive.
|
Archive |
getFilteredArchive(Archive.EntryRenameFilter filter)
Returns a filtered version of the archive.
|
Manifest |
getManifest()
Returns the manifest of the archive.
|
protected Archive |
getNestedArchive(Archive.Entry entry) |
List<Archive> |
getNestedArchives(Archive.EntryFilter filter)
Returns nested
Archive s for entries that match the specified filter. |
URL |
getUrl()
Returns a URL that can be used to load the archive.
|
getMainClass, toString
public JarFileArchive(File file) throws IOException
IOException
public JarFileArchive(File file, URL url) throws IOException
IOException
public JarFileArchive(JarFile jarFile)
public URL getUrl() throws MalformedURLException
Archive
getUrl
in class Archive
MalformedURLException
- if the URL is malformedpublic Manifest getManifest() throws IOException
Archive
getManifest
in class Archive
IOException
- if the manifest cannot be readpublic List<Archive> getNestedArchives(Archive.EntryFilter filter) throws IOException
Archive
Archive
s for entries that match the specified filter.getNestedArchives
in class Archive
filter
- the filter used to limit entriesIOException
- if nested archives cannot be readpublic Collection<Archive.Entry> getEntries()
Archive
getEntries
in class Archive
protected Archive getNestedArchive(Archive.Entry entry) throws IOException
IOException
public Archive getFilteredArchive(Archive.EntryRenameFilter filter) throws IOException
Archive
getFilteredArchive
in class Archive
filter
- the filter to applyIOException
- if the archive cannot be readCopyright © 2016 Pivotal Software, Inc.. All rights reserved.