109 extern "C" JNIEXPORT const char * JNICALL
110 JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
111
112 typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name);
113
114
115 /*
116 * JImageFindResource - Given an open image file (see JImageOpen), a module
117 * name, a version string and the name of a class/resource, return location
118 * information describing the resource and its size. If no resource is found, the
119 * function returns JIMAGE_NOT_FOUND and the value of size is undefined.
120 * The version number should be "9.0" and is not used in locating the resource.
121 * The resulting location does/should not have to be released.
122 * All strings are utf-8, zero byte terminated.
123 *
124 * Ex.
125 * jlong size;
126 * JImageLocationRef location = (*JImageFindResource)(image,
127 * "java.base", "9.0", "java/lang/String.class", &size);
128 */
129 extern "C" JNIEXPORT JImageLocationRef JIMAGE_FindResource(JImageFile* jimage,
130 const char* module_name, const char* version, const char* name,
131 jlong* size);
132
133 typedef JImageLocationRef(*JImageFindResource_t)(JImageFile* jimage,
134 const char* module_name, const char* version, const char* name,
135 jlong* size);
136
137
138 /*
139 * JImageGetResource - Given an open image file (see JImageOpen), a resource's
140 * location information (see JImageFindResource), a buffer of appropriate
141 * size and the size, retrieve the bytes associated with the
142 * resource. If the size is less than the resource size then the read is truncated.
143 * If the size is greater than the resource size then the remainder of the buffer
144 * is zero filled. The function will return the actual size of the resource.
145 *
146 * Ex.
147 * jlong size;
148 * JImageLocationRef location = (*JImageFindResource)(image,
149 * "java.base", "9.0", "java/lang/String.class", &size);
|
109 extern "C" JNIEXPORT const char * JNICALL
110 JIMAGE_PackageToModule(JImageFile* jimage, const char* package_name);
111
112 typedef const char* (*JImagePackageToModule_t)(JImageFile* jimage, const char* package_name);
113
114
115 /*
116 * JImageFindResource - Given an open image file (see JImageOpen), a module
117 * name, a version string and the name of a class/resource, return location
118 * information describing the resource and its size. If no resource is found, the
119 * function returns JIMAGE_NOT_FOUND and the value of size is undefined.
120 * The version number should be "9.0" and is not used in locating the resource.
121 * The resulting location does/should not have to be released.
122 * All strings are utf-8, zero byte terminated.
123 *
124 * Ex.
125 * jlong size;
126 * JImageLocationRef location = (*JImageFindResource)(image,
127 * "java.base", "9.0", "java/lang/String.class", &size);
128 */
129 extern "C" JNIEXPORT JImageLocationRef JNICALL JIMAGE_FindResource(JImageFile* jimage,
130 const char* module_name, const char* version, const char* name,
131 jlong* size);
132
133 typedef JImageLocationRef(*JImageFindResource_t)(JImageFile* jimage,
134 const char* module_name, const char* version, const char* name,
135 jlong* size);
136
137
138 /*
139 * JImageGetResource - Given an open image file (see JImageOpen), a resource's
140 * location information (see JImageFindResource), a buffer of appropriate
141 * size and the size, retrieve the bytes associated with the
142 * resource. If the size is less than the resource size then the read is truncated.
143 * If the size is greater than the resource size then the remainder of the buffer
144 * is zero filled. The function will return the actual size of the resource.
145 *
146 * Ex.
147 * jlong size;
148 * JImageLocationRef location = (*JImageFindResource)(image,
149 * "java.base", "9.0", "java/lang/String.class", &size);
|