public class MultiReleaseJarFile extends Object implements Closeable
Utility class to handle a Multi Release Jar file
| Modifier and Type | Class and Description |
|---|---|
class |
MultiReleaseJarFile.VersionedJarEntry
A versioned Jar entry
|
| Constructor and Description |
|---|
MultiReleaseJarFile(File file)
Construct a multi release jar file for the current JVM version, ignoring directories.
|
MultiReleaseJarFile(File file,
int javaPlatform,
boolean includeDirectories)
Construct a multi release jar file
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
MultiReleaseJarFile.VersionedJarEntry |
getEntry(String name)
Get a versioned resource entry by name
|
int |
getVersion() |
boolean |
isMultiRelease() |
Stream<MultiReleaseJarFile.VersionedJarEntry> |
stream() |
String |
toString() |
public MultiReleaseJarFile(File file) throws IOException
file - The file to openIOException - if the jar file cannot be readpublic MultiReleaseJarFile(File file, int javaPlatform, boolean includeDirectories) throws IOException
file - The file to openjavaPlatform - The JVM platform to apply when selecting a version.includeDirectories - true if any directory entries should not be ignoredIOException - if the jar file cannot be readpublic boolean isMultiRelease()
public int getVersion()
public Stream<MultiReleaseJarFile.VersionedJarEntry> stream()
public MultiReleaseJarFile.VersionedJarEntry getEntry(String name)
name - The unversioned name of the resourcepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 1995–2018 Webtide. All rights reserved.