The Java Native InterfaceProgrammer’s Guide and Specification phần 9

Một phiên bản tương lai của các đặc điểm kỹ thuật JNI có thể giới thiệu một giao diện mới, nói một giao diện JNIEnv2, đó là khác nhau từ phiên bản hiện tại của JNIEnv. Một máy ảo trong tương lai thực hiện có thể duy trì khả năng tương thích ngược bằng cách đồng thời hỗ trợ cả hai JNIEnv và JNIEnv2 giao diện. Các giá trị trả lại xử lý JNI_OnLoad | JNIFUNCTIONS GetStringUTFRegion GetStringUTFRegion Prototype void GetStringUTFRegion JNIEnv env jstring str jsize start jsize len char buf Description Translates len number of Unicode characters into UTF-8 format. The function begins the translation at offset start and places the result in the given buffer buf. The str reference and buf buffer must not be NULL. Note that the len argument denotes the number to Unicode characters to be converted not the number of UTF-8 characters to be copied. This function was introduced in Java 2 SDK release . Linkage Index 221 in the JNIEnv interface function table. Parameters env the JNIEnv interface pointer. str a reference to the string object to be copied. start the offset within the string at which to start the copy. len the number of Unicode characters to copy. buf a pointer to a buffer to hold the UTF-8 characters. Exceptions StringIndexOutOfBoundsException if an index overflow error occurs. 243 GetSuperclass JNI FUNCTIONS GetSuperclass Prototype jclass GetSuperclass JNIEnv env jclass clazz Description Returns the superclass of the given class. If clazz represents any class other than the class then this function returns a reference to the superclass of the class specified by clazz. If clazz represents the class or if clazz represents an interface this function returns NULL. Linkage Index 10 in the JNIEnv interface function table. Parameters env the JNIEnv interface pointer. clazz a reference to a class object whose superclass is to be determined. Return Values Returns the superclass of the class represented by clazz or NULL. Exceptions None. 244 JNIFUNCTIONS GetVersion GetVersion Prototype jint GetVersion JNIEnv env Description Returns the version of the JNIEnv interface. In JDK release GetVersion returns 0x00010001. In Java 2 SDK release GetVersion returns 0x00010002. A virtual machine implementation that supports both the and versions of the JNI provides only one .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
5    87    2    11-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.