public class ExplodedArchive extends java.lang.Object implements Archive
Archive
implementation backed by an exploded archive directory.Archive.Entry, Archive.EntryFilter
Constructor and Description |
---|
ExplodedArchive(java.io.File root)
Create a new
ExplodedArchive instance. |
ExplodedArchive(java.io.File root,
boolean recursive)
Create a new
ExplodedArchive instance. |
Modifier and Type | Method and Description |
---|---|
java.util.jar.Manifest |
getManifest()
Returns the manifest of the archive.
|
protected Archive |
getNestedArchive(Archive.Entry entry) |
java.util.Iterator<Archive> |
getNestedArchives(Archive.EntryFilter searchFilter,
Archive.EntryFilter includeFilter)
Returns nested
Archive s for entries that match the specified filters. |
java.net.URL |
getUrl()
Returns a URL that can be used to load the archive.
|
boolean |
isExploded()
Return if the archive is exploded (already unpacked).
|
java.util.Iterator<Archive.Entry> |
iterator()
Deprecated.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, forEach, getNestedArchives, spliterator
public ExplodedArchive(java.io.File root)
ExplodedArchive
instance.root
- the root directorypublic ExplodedArchive(java.io.File root, boolean recursive)
ExplodedArchive
instance.root
- the root directoryrecursive
- if recursive searching should be used to locate the manifest.
Defaults to true
, directories with a large tree might want to set this to
false
.public java.net.URL getUrl() throws java.net.MalformedURLException
Archive
public java.util.jar.Manifest getManifest() throws java.io.IOException
Archive
getManifest
in interface Archive
java.io.IOException
- if the manifest cannot be readpublic java.util.Iterator<Archive> getNestedArchives(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) throws java.io.IOException
Archive
Archive
s for entries that match the specified filters.getNestedArchives
in interface Archive
searchFilter
- filter used to limit when additional sub-entry searching is
required or null
if all entries should be considered.includeFilter
- filter used to determine which entries should be included in
the result or null
if all entries should be includedjava.io.IOException
- on IO error@Deprecated public java.util.Iterator<Archive.Entry> iterator()
Archive
iterator
in interface java.lang.Iterable<Archive.Entry>
iterator
in interface Archive
Iterable.iterator()
protected Archive getNestedArchive(Archive.Entry entry) throws java.io.IOException
java.io.IOException
public boolean isExploded()
Archive
isExploded
in interface Archive
public java.lang.String toString()
toString
in class java.lang.Object