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 | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ATTRIBUTE_BASE
String table offset of resource path base. |
| public static final int | ATTRIBUTE_COMPRESSED
In-image byte size of the compressed resource. |
| public static final int | ATTRIBUTE_COUNT
Number of attribute kinds. |
| public static final int | ATTRIBUTE_END
End of attribute stream marker. |
| public static final int | ATTRIBUTE_EXTENSION
String table offset of resource path extension. |
| public static final int | ATTRIBUTE_MODULE
String table offset of module name. |
| public static final int | ATTRIBUTE_OFFSET
Container byte offset of resource. |
| public static final int | ATTRIBUTE_PARENT
String table offset of resource path parent. |
| public static final int | ATTRIBUTE_PREVIEW_FLAGS
Flags relating to preview mode resources. |
| public static final int | ATTRIBUTE_UNCOMPRESSED
In-memory byte size of the uncompressed resource. |
| protected final long[] | |
| private static final int | FLAGS_HAS_PREVIEW_VERSION
Indicates that a non-preview location is associated with preview resources. |
| private static final int | FLAGS_IS_PREVIEW_ONLY
Indicates that a location only exists due to preview resources. |
| private static final int | FLAGS_IS_PREVIEW_VERSION
Set on all locations in the |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| protected final ImageStrings |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | |
| pack-priv static long[] | |
| pack-priv long | |
| pack-priv String | |
| public String | |
| public int | |
| public long | |
| public long | |
| public String | |
| public int | |
| public int | |
| public String | |
| public String | |
| public String | |
| public int | |
| public static int | Returns: package flags for"/packages/xxx" directory entries.Helper function to calculate package flags for |
| public String | |
| public int | |
| public static int | Returns: flags for the ATTRIBUTE_PREVIEW_FLAGS attribute.the jimage name of the resource or directory. name, Predicate<String> a predicate for jimage names returning whether an entry
is present. hasEntry)Helper function to calculate preview flags (ATTRIBUTE_PREVIEW_FLAGS). |
| pack-priv ImageStrings | |
| public ImageLocation. | |
| public long | |
| public static boolean | hasPreviewVersion(int flags)
Tests a non-preview image location's flags to see if it has preview content associated with it. |
| public static boolean | |
| private boolean | |
| pack-priv static ImageLocation | |
| private static long | |
| public String | |
| public boolean | |
| pack-priv static boolean | verify(String name, long[] attributes, ImageStrings strings)
A simpler verification would be |
| pack-priv static boolean | |
| pack-priv static boolean | |
| private static boolean | verifyName(String module, String name, int index, int length, int moduleOffset, int parentOffset, int baseOffset, int extOffset, ImageStrings strings)
|
| ATTRIBUTE_BASE | back to summary |
|---|---|
| public static final int ATTRIBUTE_BASE String table offset of resource path base. | |
| ATTRIBUTE_COMPRESSED | back to summary |
|---|---|
| public static final int ATTRIBUTE_COMPRESSED In-image byte size of the compressed resource. | |
| ATTRIBUTE_COUNT | back to summary |
|---|---|
| public static final int ATTRIBUTE_COUNT Number of attribute kinds. | |
| ATTRIBUTE_END | back to summary |
|---|---|
| public static final int ATTRIBUTE_END End of attribute stream marker. | |
| ATTRIBUTE_EXTENSION | back to summary |
|---|---|
| public static final int ATTRIBUTE_EXTENSION String table offset of resource path extension. | |
| ATTRIBUTE_MODULE | back to summary |
|---|---|
| public static final int ATTRIBUTE_MODULE String table offset of module name. | |
| ATTRIBUTE_OFFSET | back to summary |
|---|---|
| public static final int ATTRIBUTE_OFFSET Container byte offset of resource. | |
| ATTRIBUTE_PARENT | back to summary |
|---|---|
| public static final int ATTRIBUTE_PARENT String table offset of resource path parent. | |
| ATTRIBUTE_PREVIEW_FLAGS | back to summary |
|---|---|
| public static final int ATTRIBUTE_PREVIEW_FLAGS Flags relating to preview mode resources. | |
| ATTRIBUTE_UNCOMPRESSED | back to summary |
|---|---|
| public static final int ATTRIBUTE_UNCOMPRESSED In-memory byte size of the uncompressed resource. | |
| attributes | back to summary |
|---|---|
| protected final long[] attributes | |
| FLAGS_HAS_PREVIEW_VERSION | back to summary |
|---|---|
| private static final int FLAGS_HAS_PREVIEW_VERSION Indicates that a non-preview location is associated with preview resources. This can apply to both resources and directories in the
For | |
| FLAGS_IS_PREVIEW_ONLY | back to summary |
|---|---|
| private static final int FLAGS_IS_PREVIEW_ONLY Indicates that a location only exists due to preview resources. This can apply to both resources and directories in the
For This flag is mutually exclusive with | |
| FLAGS_IS_PREVIEW_VERSION | back to summary |
|---|---|
| private static final int FLAGS_IS_PREVIEW_VERSION Set on all locations in the This flag is mutually exclusive with | |
| MODULES_PREFIX | back to summary |
|---|---|
| pack-priv static final String MODULES_PREFIX | |
| PACKAGES_PREFIX | back to summary |
|---|---|
| pack-priv static final String PACKAGES_PREFIX | |
| PREVIEW_INFIX | back to summary |
|---|---|
| pack-priv static final String PREVIEW_INFIX | |
| strings | back to summary |
|---|---|
| protected final ImageStrings strings | |
| ImageLocation | back to summary |
|---|---|
| public ImageLocation(long[] attributes, ImageStrings strings) | |
| compress | back to summary |
|---|---|
| public static byte[] compress(long[] attributes) | |
| decompress | back to summary |
|---|---|
| pack-priv static long[] decompress(ByteBuffer bytes, int offset) | |
| getAttribute | back to summary |
|---|---|
| pack-priv long getAttribute(int kind) | |
| getAttributeString | back to summary |
|---|---|
| pack-priv String getAttributeString(int kind) | |
| getBase | back to summary |
|---|---|
| public String getBase() | |
| getBaseOffset | back to summary |
|---|---|
| public int getBaseOffset() | |
| getCompressedSize | back to summary |
|---|---|
| public long getCompressedSize() | |
| getContentOffset | back to summary |
|---|---|
| public long getContentOffset() | |
| getExtension | back to summary |
|---|---|
| public String getExtension() | |
| getExtensionOffset | back to summary |
|---|---|
| public int getExtensionOffset() | |
| getFlags | back to summary |
|---|---|
| public int getFlags() | |
| getFullName | back to summary |
|---|---|
| public String getFullName() | |
| getFullName | back to summary |
|---|---|
| public String getFullName(boolean modulesPrefix) | |
| getModule | back to summary |
|---|---|
| public String getModule() | |
| getModuleOffset | back to summary |
|---|---|
| public int getModuleOffset() | |
| getPackageFlags | back to summary |
|---|---|
| public static int getPackageFlags(List<ModuleLink> moduleLinks) Helper function to calculate package flags for Based on the module links, the flags are:
| |
| getParent | back to summary |
|---|---|
| public String getParent() | |
| getParentOffset | back to summary |
|---|---|
| public int getParentOffset() | |
| getPreviewFlags | back to summary |
|---|---|
| public static int getPreviewFlags(String name, Predicate<String> hasEntry) Helper function to calculate preview flags (ATTRIBUTE_PREVIEW_FLAGS). Since preview flags are calculated separately for resource nodes and directory nodes (in two quite different places) it's useful to have a common helper. Based on the entry name, the flags are:
| |
| getStrings | back to summary |
|---|---|
| pack-priv ImageStrings getStrings() | |
| getType | back to summary |
|---|---|
| public ImageLocation. | |
| getUncompressedSize | back to summary |
|---|---|
| public long getUncompressedSize() | |
| hasPreviewVersion | back to summary |
|---|---|
| public static boolean hasPreviewVersion(int flags) Tests a non-preview image location's flags to see if it has preview content associated with it. | |
| isPreviewOnly | back to summary |
|---|---|
| public static boolean isPreviewOnly(int flags) Tests an image location's flags to see if it only exists in preview mode. | |
| isRootDir | back to summary |
|---|---|
| private boolean isRootDir() | |
| readFrom | back to summary |
|---|---|
| pack-priv static ImageLocation readFrom(BasicImageReader reader, int offset) | |
| readValue | back to summary |
|---|---|
| private static long readValue(int length, ByteBuffer buffer, int offset, int limit) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| verify | back to summary |
|---|---|
| public boolean verify(String name) | |
| verify | back to summary |
|---|---|
| pack-priv static boolean verify(String name, long[] attributes, ImageStrings strings) A simpler verification would be | |
| verify | back to summary |
|---|---|
| pack-priv static boolean verify(String module, String name, ByteBuffer locations, int locationOffset, ImageStrings strings) | |
| verify | back to summary |
|---|---|
| pack-priv static boolean verify(String module, String name, long[] attributes, ImageStrings strings) | |
| verifyName | back to summary |
|---|---|
| private static boolean verifyName(String module, String name, int index, int length, int moduleOffset, int parentOffset, int baseOffset, int extOffset, ImageStrings strings) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ImageLocation. | |
| public static final ImageLocation. | |
| public static final ImageLocation. | |
| public static final ImageLocation. | |
| public static final ImageLocation. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ImageLocation. | |
| public static ImageLocation. |
| MODULES_DIR | back to summary |
|---|---|
| public static final ImageLocation. | |
| MODULES_ROOT | back to summary |
|---|---|
| public static final ImageLocation. | |
| PACKAGES_DIR | back to summary |
|---|---|
| public static final ImageLocation. | |
| PACKAGES_ROOT | back to summary |
|---|---|
| public static final ImageLocation. | |
| RESOURCE | back to summary |
|---|---|
| public static final ImageLocation. | |
| LocationType | back to summary |
|---|---|
| private LocationType() | |
| valueOf | back to summary |
|---|---|
| public static ImageLocation. | |
| values | back to summary |
|---|---|
| public static ImageLocation. | |