public interface Archive extends java.lang.Iterable<Archive.Entry>, java.lang.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(java.util.function.Consumer<? super Archive.Entry> action)
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of using
JarFile to access entries and
getNestedArchives(EntryFilter, EntryFilter) for accessing nested archives. |
java.util.jar.Manifest |
getManifest()
Returns the manifest of the archive.
|
default java.util.List<Archive> |
getNestedArchives(Archive.EntryFilter filter)
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of
getNestedArchives(EntryFilter, EntryFilter) |
default 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.
|
default boolean |
isExploded()
Return if the archive is exploded (already unpacked).
|
java.util.Iterator<Archive.Entry> |
iterator()
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of using
JarFile to access entries and
getNestedArchives(EntryFilter, EntryFilter) for accessing nested archives. |
default java.util.Spliterator<Archive.Entry> |
spliterator()
Deprecated.
since 2.3.0 for removal in 2.5.0 in favor of using
JarFile to access entries and
getNestedArchives(EntryFilter, EntryFilter) for accessing nested archives. |
java.net.URL getUrl() throws java.net.MalformedURLException
java.net.MalformedURLException
- if the URL is malformedjava.util.jar.Manifest getManifest() throws java.io.IOException
java.io.IOException
- if the manifest cannot be readdefault java.util.Iterator<Archive> getNestedArchives(Archive.EntryFilter searchFilter, Archive.EntryFilter includeFilter) throws java.io.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 includedjava.io.IOException
- on IO error@Deprecated default java.util.List<Archive> getNestedArchives(Archive.EntryFilter filter) throws java.io.IOException
getNestedArchives(EntryFilter, EntryFilter)
Archive
s for entries that match the specified filter.filter
- the filter used to limit entriesjava.io.IOException
- if nested archives cannot be read@Deprecated java.util.Iterator<Archive.Entry> iterator()
JarFile
to access entries and
getNestedArchives(EntryFilter, EntryFilter)
for accessing nested archives.iterator
in interface java.lang.Iterable<Archive.Entry>
Iterable.iterator()
@Deprecated default void forEach(java.util.function.Consumer<? super Archive.Entry> action)
JarFile
to access entries and
getNestedArchives(EntryFilter, EntryFilter)
for accessing nested archives.Iterable
until all
elements have been processed or the action throws an exception.forEach
in interface java.lang.Iterable<Archive.Entry>
Iterable.forEach(java.util.function.Consumer<? super T>)
@Deprecated default java.util.Spliterator<Archive.Entry> spliterator()
JarFile
to access entries and
getNestedArchives(EntryFilter, EntryFilter)
for accessing nested archives.Spliterator
over the elements described by this Iterable
.spliterator
in interface java.lang.Iterable<Archive.Entry>
Iterable.spliterator()
default boolean isExploded()
default void close() throws java.lang.Exception
Archive
, releasing any open resources.close
in interface java.lang.AutoCloseable
java.lang.Exception
- if an error occurs during close processing