public class ExplodedArchive extends Object implements Archive
Archive
implementation backed by an exploded archive directory.Archive.Entry, Archive.EntryFilter
Constructor and Description |
---|
ExplodedArchive(File root)
Create a new
ExplodedArchive instance. |
ExplodedArchive(File root,
boolean recursive)
Create a new
ExplodedArchive instance. |
Modifier and Type | Method and Description |
---|---|
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.
|
Iterator<Archive.Entry> |
iterator() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ExplodedArchive(File root)
ExplodedArchive
instance.root
- the root folderpublic ExplodedArchive(File root, boolean recursive)
ExplodedArchive
instance.root
- the root folderrecursive
- if recursive searching should be used to locate the manifest.
Defaults to true
, folders with a large tree might want to set this to
false
.public URL getUrl() throws MalformedURLException
Archive
getUrl
in interface Archive
MalformedURLException
- if the URL is malformedpublic Manifest getManifest() throws IOException
Archive
getManifest
in interface 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 interface Archive
filter
- the filter used to limit entriesIOException
- if nested archives cannot be readpublic Iterator<Archive.Entry> iterator()
iterator
in interface Iterable<Archive.Entry>
protected Archive getNestedArchive(Archive.Entry entry) throws IOException
IOException
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.