public class JarFileArchive extends Object implements Archive
Archive
implementation backed by a RandomAccessJarFile
.Archive.Entry, Archive.EntryFilter
Constructor and Description |
---|
JarFileArchive(File file) |
JarFileArchive(RandomAccessJarFile jarFile) |
Modifier and Type | Method and Description |
---|---|
Iterable<Archive.Entry> |
getEntries()
Returns archive entries.
|
Archive |
getFilteredArchive(Archive.EntryFilter filter)
Returns a filtered version of the archive.
|
Manifest |
getManifest()
Returns the manifest of the archive.
|
Archive |
getNestedArchive(Archive.Entry entry)
Returns a nest archive from on the the contained entries.
|
URL |
getUrl()
Returns a URL that can be used to load the archive.
|
public JarFileArchive(File file) throws IOException
IOException
public JarFileArchive(RandomAccessJarFile jarFile)
public Manifest getManifest() throws IOException
Archive
getManifest
in interface Archive
IOException
public Iterable<Archive.Entry> getEntries()
Archive
getEntries
in interface Archive
public URL getUrl() throws MalformedURLException
Archive
getUrl
in interface Archive
MalformedURLException
public Archive getNestedArchive(Archive.Entry entry) throws IOException
Archive
getNestedArchive
in interface Archive
entry
- the entry (may be a directory or file)IOException
public Archive getFilteredArchive(Archive.EntryFilter filter) throws IOException
Archive
getFilteredArchive
in interface Archive
filter
- the filter to applyIOException
Copyright © 2013. All rights reserved.