Version number changes must be synced in a single change across all code which reads/writes jimage files, and code which tries to open a jimage file with an unexpected version should fail.
Known jimage file code which needs updating on version change:
Version history:
1.0: Original version.
1.1: Support preview mode with new flags.
Implementation Note
This class needs to maintain JDK 8 source compatibility. It is used internally in the JDK to implement jimage/jrtfs access, but also compiled and delivered as part of the jrtfs.jar to support access to the jimage file provided by the shipped JDK by tools running on JDK 8.
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private static final int | |
| private final int | |
| public static final int | |
| private final int | |
| public static final int | |
| private final int | |
| public static final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ImageHeader(int magic, int majorVersion, int minorVersion, int flags, int resourceCount, int tableLength, int locationsSize, int stringsSize)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public static int | |
| public int | |
| pack-priv int | |
| public int | |
| public int | |
| public int | |
| public int | |
| pack-priv int | |
| public int | |
| pack-priv int | |
| public int | |
| public int | |
| pack-priv int | |
| public int | |
| public int | |
| pack-priv static ImageHeader | |
| public void | |
| public void |
| flags | back to summary |
|---|---|
| private final int flags | |
| HEADER_SLOTS | back to summary |
|---|---|
| private static final int HEADER_SLOTS | |
| locationsSize | back to summary |
|---|---|
| private final int locationsSize | |
| MAGIC | back to summary |
|---|---|
| public static final int MAGIC | |
| magic | back to summary |
|---|---|
| private final int magic | |
| MAJOR_VERSION | back to summary |
|---|---|
| public static final int MAJOR_VERSION | |
| majorVersion | back to summary |
|---|---|
| private final int majorVersion | |
| MINOR_VERSION | back to summary |
|---|---|
| public static final int MINOR_VERSION | |
| minorVersion | back to summary |
|---|---|
| private final int minorVersion | |
| resourceCount | back to summary |
|---|---|
| private final int resourceCount | |
| stringsSize | back to summary |
|---|---|
| private final int stringsSize | |
| tableLength | back to summary |
|---|---|
| private final int tableLength | |
| ImageHeader | back to summary |
|---|---|
| public ImageHeader(int resourceCount, int tableCount, int locationsSize, int stringsSize) | |
| ImageHeader | back to summary |
|---|---|
| public ImageHeader(int magic, int majorVersion, int minorVersion, int flags, int resourceCount, int tableLength, int locationsSize, int stringsSize) | |
| getFlags | back to summary |
|---|---|
| public int getFlags() | |
| getHeaderSize | back to summary |
|---|---|
| public static int getHeaderSize() | |
| getIndexSize | back to summary |
|---|---|
| public int getIndexSize() | |
| getLocationsOffset | back to summary |
|---|---|
| pack-priv int getLocationsOffset() | |
| getLocationsSize | back to summary |
|---|---|
| public int getLocationsSize() | |
| getMagic | back to summary |
|---|---|
| public int getMagic() | |
| getMajorVersion | back to summary |
|---|---|
| public int getMajorVersion() | |
| getMinorVersion | back to summary |
|---|---|
| public int getMinorVersion() | |
| getOffsetsOffset | back to summary |
|---|---|
| pack-priv int getOffsetsOffset() | |
| getOffsetsSize | back to summary |
|---|---|
| public int getOffsetsSize() | |
| getRedirectOffset | back to summary |
|---|---|
| pack-priv int getRedirectOffset() | |
| getRedirectSize | back to summary |
|---|---|
| public int getRedirectSize() | |
| getResourceCount | back to summary |
|---|---|
| public int getResourceCount() | |
| getStringsOffset | back to summary |
|---|---|
| pack-priv int getStringsOffset() | |
| getStringsSize | back to summary |
|---|---|
| public int getStringsSize() | |
| getTableLength | back to summary |
|---|---|
| public int getTableLength() | |
| readFrom | back to summary |
|---|---|
| pack-priv static ImageHeader readFrom(IntBuffer buffer) | |
| writeTo | back to summary |
|---|---|
| public void writeTo(ImageStream stream) | |
| writeTo | back to summary |
|---|---|
| public void writeTo(ByteBuffer buffer) | |