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