public final class Java9Support extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
V1_9
Version of the Java 9 class file format.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
downgrade(byte[] b)
Replaces version in the definition of class on
Opcodes.V1_8. |
static byte[] |
downgradeIfRequired(byte[] buffer)
Returns new definition of class with version
Opcodes.V1_8,
if it has version V1_9. |
static boolean |
isPatchRequired(byte[] buffer)
Determines whether class definition contains
V1_9 version. |
static byte[] |
readFully(InputStream is)
Reads all bytes from an input stream into a byte array.
|
static void |
upgrade(byte[] b)
Replaces version in the definition of class on
V1_9. |
public static final int V1_9
public static byte[] readFully(InputStream is) throws IOException
is - the input stream to read fromIOException - if an I/O error occurspublic static boolean isPatchRequired(byte[] buffer)
V1_9 version.buffer - definition of the classtrue if class definition contains Java 9 versionpublic static byte[] downgradeIfRequired(byte[] buffer)
Opcodes.V1_8,
if it has version V1_9.buffer - definition of the classpublic static byte[] downgrade(byte[] b)
Opcodes.V1_8.b - definition of the classpublic static void upgrade(byte[] b)
V1_9.b - definition of the classCopyright © 2024. All rights reserved.