Lines Matching refs:env
23 static int GetBufferPosition(JNIEnv* env, jobject nioBuffer) { in GetBufferPosition() argument
24 return(*env)->GetIntField(env, nioBuffer, JniConstants_NioBuffer_position(env)); in GetBufferPosition()
27 static int GetBufferLimit(JNIEnv* env, jobject nioBuffer) { in GetBufferLimit() argument
28 return(*env)->GetIntField(env, nioBuffer, JniConstants_NioBuffer_limit(env)); in GetBufferLimit()
31 static int GetBufferElementSizeShift(JNIEnv* env, jobject nioBuffer) { in GetBufferElementSizeShift() argument
32 return(*env)->GetIntField(env, nioBuffer, JniConstants_NioBuffer__elementSizeShift(env)); in GetBufferElementSizeShift()
35 jobject jniCreateFileDescriptor(JNIEnv* env, int fd) { in jniCreateFileDescriptor() argument
36 jobject fileDescriptor = (*env)->NewObject(env, in jniCreateFileDescriptor()
37 JniConstants_FileDescriptorClass(env), in jniCreateFileDescriptor()
38 JniConstants_FileDescriptor_init(env)); in jniCreateFileDescriptor()
42 jniSetFileDescriptorOfFD(env, fileDescriptor, fd); in jniCreateFileDescriptor()
47 int jniGetFDFromFileDescriptor(JNIEnv* env, jobject fileDescriptor) { in jniGetFDFromFileDescriptor() argument
49 return (*env)->GetIntField(env, fileDescriptor, in jniGetFDFromFileDescriptor()
50 JniConstants_FileDescriptor_descriptor(env)); in jniGetFDFromFileDescriptor()
56 void jniSetFileDescriptorOfFD(JNIEnv* env, jobject fileDescriptor, int value) { in jniSetFileDescriptorOfFD() argument
58 jniThrowNullPointerException(env, "null FileDescriptor"); in jniSetFileDescriptorOfFD()
60 (*env)->SetIntField(env, in jniSetFileDescriptorOfFD()
61 fileDescriptor, JniConstants_FileDescriptor_descriptor(env), value); in jniSetFileDescriptorOfFD()
65 jarray jniGetNioBufferBaseArray(JNIEnv* env, jobject nioBuffer) { in jniGetNioBufferBaseArray() argument
66 jclass nioAccessClass = JniConstants_NIOAccessClass(env); in jniGetNioBufferBaseArray()
67 jmethodID getBaseArrayMethod = JniConstants_NIOAccess_getBaseArray(env); in jniGetNioBufferBaseArray()
68 jobject object = (*env)->CallStaticObjectMethod(env, in jniGetNioBufferBaseArray()
73 int jniGetNioBufferBaseArrayOffset(JNIEnv* env, jobject nioBuffer) { in jniGetNioBufferBaseArrayOffset() argument
74 jclass nioAccessClass = JniConstants_NIOAccessClass(env); in jniGetNioBufferBaseArrayOffset()
75 jmethodID getBaseArrayOffsetMethod = JniConstants_NIOAccess_getBaseArrayOffset(env); in jniGetNioBufferBaseArrayOffset()
76 return (*env)->CallStaticIntMethod(env, nioAccessClass, getBaseArrayOffsetMethod, nioBuffer); in jniGetNioBufferBaseArrayOffset()
79 jlong jniGetNioBufferPointer(JNIEnv* env, jobject nioBuffer) { in jniGetNioBufferPointer() argument
80 jlong baseAddress = (*env)->GetLongField(env, nioBuffer, JniConstants_NioBuffer_address(env)); in jniGetNioBufferPointer()
82 const int position = GetBufferPosition(env, nioBuffer); in jniGetNioBufferPointer()
83 const int shift = GetBufferElementSizeShift(env, nioBuffer); in jniGetNioBufferPointer()
89 jlong jniGetNioBufferFields(JNIEnv* env, jobject nioBuffer, in jniGetNioBufferFields() argument
91 *position = GetBufferPosition(env, nioBuffer); in jniGetNioBufferFields()
92 *limit = GetBufferLimit(env, nioBuffer); in jniGetNioBufferFields()
93 *elementSizeShift = GetBufferElementSizeShift(env, nioBuffer); in jniGetNioBufferFields()
94 return (*env)->GetLongField(env, nioBuffer, JniConstants_NioBuffer_address(env)); in jniGetNioBufferFields()