public interface Archive extends Iterable<Archive.Entry>, AutoCloseable
Launcher
.JarFileArchive
Modifier and Type | Interface and Description |
---|---|
static interface |
Archive.Entry
Represents a single entry in the archive.
|
static interface |
Archive.EntryFilter
Strategy interface to filter
Entries . |
Modifier and Type | Method and Description |
---|---|
default void |
close()
Closes the
Archive , releasing any open resources. |
default void |
forEach(Consumer<? super Archive.Entry> action)
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of using
|
Manifest |
getManifest()
Returns the manifest of the archive.
|
default List<Archive> |
getNestedArchives(Archive.EntryFilter filter)
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of
getNestedArchives(EntryFilter, EntryFilter) |
default Iterator<Archive> |
getNestedArchives(Archive.EntryFilter searchFilter,
Archive.EntryFilter includeFilter)
Returns nested
Archive s for entries that match the specified filters. |
URL |
getUrl()
Returns a URL that can be used to load the archive.
|
default boolean |
isExploded()
Return if the archive is exploded (already unpacked).
|
Iterator<Archive.Entry> |
iterator()
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of using
|
default Spliterator<Archive.Entry> |
spliterator()
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of using
|
URL getUrl() throws MalformedURLException
MalformedURLException
- if the URL is malformedManifest getManifest() throws IOException
IOException
- if the manifest cannot be readdefault Iterator<Archive> getNestedArchives(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) throws IOException
Archive
s for entries that match the specified filters.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 includedIOException
- on IO error@Deprecated default List<Archive> getNestedArchives(Archive.EntryFilter filter) throws IOException
getNestedArchives(EntryFilter, EntryFilter)
Archive
s for entries that match the specified filter.filter
- the filter used to limit entriesIOException
- if nested archives cannot be read@Deprecated Iterator<Archive.Entry> iterator()
@Deprecated default void forEach(Consumer<? super Archive.Entry> action)
Iterable
until all
elements have been processed or the action throws an exception.@Deprecated default Spliterator<Archive.Entry> spliterator()
Spliterator
over the elements described by this Iterable
.default boolean isExploded()
default void close() throws Exception
Archive
, releasing any open resources.close
in interface AutoCloseable
Exception
- if an error occurs during close processing