Home
last modified time | relevance | path

Searched refs:env (Results 1 – 25 of 104) sorted by relevance

12345

/libcore/luni/src/main/native/
Dandroid_system_OsConstants.cpp61 static void initConstant(JNIEnv* env, jclass c, const char* fieldName, int value) { in initConstant() argument
62 jfieldID field = env->GetStaticFieldID(c, fieldName, "I"); in initConstant()
63 env->SetStaticIntField(c, field, value); in initConstant()
66 static void OsConstants_initConstants(JNIEnv* env, jclass c) { in OsConstants_initConstants() argument
67 initConstant(env, c, "AF_INET", AF_INET); in OsConstants_initConstants()
68 initConstant(env, c, "AF_INET6", AF_INET6); in OsConstants_initConstants()
69 initConstant(env, c, "AF_PACKET", AF_PACKET); in OsConstants_initConstants()
70 initConstant(env, c, "AF_NETLINK", AF_NETLINK); in OsConstants_initConstants()
71 initConstant(env, c, "AF_UNIX", AF_UNIX); in OsConstants_initConstants()
72 initConstant(env, c, "AF_VSOCK", AF_VSOCK); in OsConstants_initConstants()
[all …]
DJniConstants.cpp30 jclass findClass(JNIEnv* env, const char* name) { in findClass() argument
31 ScopedLocalRef<jclass> localClass(env, env->FindClass(name)); in findClass()
32 jclass result = reinterpret_cast<jclass>(env->NewGlobalRef(localClass.get())); in findClass()
87 void EnsureJniConstantsInitialized(JNIEnv* env) { in EnsureJniConstantsInitialized() argument
97 booleanClass = findClass(env, "java/lang/Boolean"); in EnsureJniConstantsInitialized()
98 byteBufferClass = findClass(env, "java/nio/ByteBuffer"); in EnsureJniConstantsInitialized()
99 doubleClass = findClass(env, "java/lang/Double"); in EnsureJniConstantsInitialized()
100 errnoExceptionClass = findClass(env, "android/system/ErrnoException"); in EnsureJniConstantsInitialized()
101 fileDescriptorClass = findClass(env, "java/io/FileDescriptor"); in EnsureJniConstantsInitialized()
102 gaiExceptionClass = findClass(env, "android/system/GaiException"); in EnsureJniConstantsInitialized()
[all …]
DJniConstants.h27 static void Initialize(JNIEnv* env);
32 static jclass GetBooleanClass(JNIEnv* env);
33 static jclass GetByteBufferClass(JNIEnv* env);
34 static jclass GetDoubleClass(JNIEnv* env);
35 static jclass GetErrnoExceptionClass(JNIEnv* env);
36 static jclass GetFileDescriptorClass(JNIEnv* env);
37 static jclass GetGaiExceptionClass(JNIEnv* env);
38 static jclass GetInet6AddressClass(JNIEnv* env);
39 static jclass GetInet6AddressHolderClass(JNIEnv* env);
40 static jclass GetInetAddressClass(JNIEnv* env);
[all …]
Djava_lang_invoke_VarHandle.cpp20 static void ThrowUnsupportedOperationForAccessMode(JNIEnv* env, const char* accessMode) { in ThrowUnsupportedOperationForAccessMode() argument
25 jniThrowExceptionFmt(env, in ThrowUnsupportedOperationForAccessMode()
31 static jobject VarHandle_compareAndExchange(JNIEnv* env, jobject, jobjectArray) { in VarHandle_compareAndExchange() argument
33 ThrowUnsupportedOperationForAccessMode(env, "compareAndExchange"); in VarHandle_compareAndExchange()
37 static jobject VarHandle_compareAndExchangeAcquire(JNIEnv* env, jobject, jobjectArray) { in VarHandle_compareAndExchangeAcquire() argument
39 ThrowUnsupportedOperationForAccessMode(env, "compareAndExchangeAcquire"); in VarHandle_compareAndExchangeAcquire()
43 static jobject VarHandle_compareAndExchangeRelease(JNIEnv* env, jobject, jobjectArray) { in VarHandle_compareAndExchangeRelease() argument
45 ThrowUnsupportedOperationForAccessMode(env, "compareAndExchangeRelease"); in VarHandle_compareAndExchangeRelease()
49 static jboolean VarHandle_compareAndSet(JNIEnv* env, jobject, jobjectArray) { in VarHandle_compareAndSet() argument
51 ThrowUnsupportedOperationForAccessMode(env, "compareAndSet"); in VarHandle_compareAndSet()
[all …]
Dlibcore_io_Linux.cpp85 jstring NAME = env->NewStringUTF(EXP); \
237 static void throwException(JNIEnv* env, jclass exceptionClass, jmethodID ctor3, jmethodID ctor2, in throwException() argument
240 if (env->ExceptionCheck()) { in throwException()
241 cause = env->ExceptionOccurred(); in throwException()
242 env->ExceptionClear(); in throwException()
245 ScopedLocalRef<jstring> detailMessage(env, env->NewStringUTF(functionName)); in throwException()
249 env->ExceptionClear(); in throwException()
254 exception = env->NewObject(exceptionClass, ctor3, detailMessage.get(), error, cause); in throwException()
256 exception = env->NewObject(exceptionClass, ctor2, detailMessage.get(), error); in throwException()
258 env->Throw(reinterpret_cast<jthrowable>(exception)); in throwException()
[all …]
DNetworkUtilities.cpp37 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, jint* port) { in sockaddrToInetAddress() argument
52 return sockaddrToInetAddress(env, tmp, port); in sockaddrToInetAddress()
73 jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", in sockaddrToInetAddress()
81 ScopedLocalRef<jbyteArray> byteArray(env, env->NewByteArray(addressLength)); in sockaddrToInetAddress()
85 env->SetByteArrayRegion(byteArray.get(), 0, addressLength, in sockaddrToInetAddress()
88 …static jmethodID getByAddressMethod = env->GetStaticMethodID(JniConstants::GetInetAddressClass(env in sockaddrToInetAddress()
93 return env->CallStaticObjectMethod(JniConstants::GetInetAddressClass(env), getByAddressMethod, in sockaddrToInetAddress()
97 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument
102 jniThrowNullPointerException(env, NULL); in inetAddressToSockaddr()
107 …static jfieldID holderFid = env->GetFieldID(JniConstants::GetInetAddressClass(env), "holder", "Lja… in inetAddressToSockaddr()
[all …]
Dorg_apache_harmony_xml_ExpatParser.cpp75 void push(JNIEnv* env, jstring s) { in push() argument
80 jniThrowOutOfMemoryError(env, NULL); in push()
110 : env(NULL), object(object), buffer(NULL), bufferSize(-1) { in ParsingContext()
127 env->DeleteGlobalRef(current->interned); in ~ParsingContext()
145 jcharArray javaBuffer = env->NewCharArray(length); in ensureCapacity()
149 javaBuffer = reinterpret_cast<jcharArray>(env->NewGlobalRef(javaBuffer)); in ensureCapacity()
161 env->DeleteGlobalRef(buffer); in freeBuffer()
172 JNIEnv* env; member
260 static InternedString* newInternedString(JNIEnv* env, const char* bytes, int hash) { in newInternedString() argument
264 jniThrowOutOfMemoryError(env, NULL); in newInternedString()
[all …]
DvalueOf.cpp26 static jobject valueOf(JNIEnv* env, jclass c, const char* signature, const T& value) { in valueOf() argument
27 static jmethodID valueOfMethod = env->GetStaticMethodID(c, "valueOf", signature); in valueOf()
28 if (env->ExceptionCheck()) { in valueOf()
31 jobject result = env->CallStaticObjectMethod(c, valueOfMethod, value); in valueOf()
32 if (env->ExceptionCheck()) { in valueOf()
38 jobject booleanValueOf(JNIEnv* env, jboolean value) { in booleanValueOf() argument
39 return valueOf(env, JniConstants::GetBooleanClass(env), "(Z)Ljava/lang/Boolean;", value); in booleanValueOf()
42 jobject doubleValueOf(JNIEnv* env, jdouble value) { in doubleValueOf() argument
43 return valueOf(env, JniConstants::GetDoubleClass(env), "(D)Ljava/lang/Double;", value); in doubleValueOf()
46 jobject integerValueOf(JNIEnv* env, jint value) { in integerValueOf() argument
[all …]
/libcore/ojluni/src/main/native/
Djni_util.c45 JNU_ThrowByName(JNIEnv *env, const char *name, const char *msg) in JNU_ThrowByName() argument
47 jclass cls = (*env)->FindClass(env, name); in JNU_ThrowByName()
50 (*env)->ThrowNew(env, cls, msg); in JNU_ThrowByName()
56 JNU_ThrowNullPointerException(JNIEnv *env, const char *msg) in JNU_ThrowNullPointerException() argument
58 JNU_ThrowByName(env, "java/lang/NullPointerException", msg); in JNU_ThrowNullPointerException()
62 JNU_ThrowArrayIndexOutOfBoundsException(JNIEnv *env, const char *msg) in JNU_ThrowArrayIndexOutOfBoundsException() argument
64 JNU_ThrowByName(env, "java/lang/ArrayIndexOutOfBoundsException", msg); in JNU_ThrowArrayIndexOutOfBoundsException()
68 JNU_ThrowOutOfMemoryError(JNIEnv *env, const char *msg) in JNU_ThrowOutOfMemoryError() argument
70 JNU_ThrowByName(env, "java/lang/OutOfMemoryError", msg); in JNU_ThrowOutOfMemoryError()
74 JNU_ThrowIllegalArgumentException(JNIEnv *env, const char *msg) in JNU_ThrowIllegalArgumentException() argument
[all …]
DOnLoad.cpp25 extern "C" void register_java_util_zip_ZipFile(JNIEnv* env);
26 extern "C" void register_java_util_zip_Inflater(JNIEnv* env);
27 extern "C" void register_java_util_zip_Deflater(JNIEnv* env);
28 extern "C" void register_java_util_zip_CRC32(JNIEnv* env);
29 extern "C" void register_java_util_zip_Adler32(JNIEnv* env);
30 extern "C" void register_java_io_FileDescriptor(JNIEnv* env);
31 extern "C" void register_sun_nio_ch_DatagramChannelImpl(JNIEnv* env);
32 extern "C" void register_sun_nio_ch_DatagramDispatcher(JNIEnv* env);
33 extern "C" void register_java_io_Console(JNIEnv* env);
34 extern "C" void register_sun_nio_ch_IOUtil(JNIEnv* env);
[all …]
DSystem.c49 jstring jkey = (*env)->NewStringUTF(env, key); \
50 jstring jval = (*env)->NewStringUTF(env, val); \
51 jobject r = (*env)->CallObjectMethod(env, props, putID, jkey, jval); \
52 if ((*env)->ExceptionOccurred(env)) return NULL; \
53 (*env)->DeleteLocalRef(env, jkey); \
54 (*env)->DeleteLocalRef(env, jval); \
55 (*env)->DeleteLocalRef(env, r); \
63 jstring jkey = (*env)->NewStringUTF(env, key); \
64 jstring jval = GetStringPlatform(env, val); \
65 jobject r = (*env)->CallObjectMethod(env, props, putID, jkey, jval); \
[all …]
Dnet_util.c43 JNIEnv *env; in net_JNI_OnLoad() local
45 if ((*vm)->GetEnv(vm, (void **)&env, JNI_VERSION_1_2) == JNI_OK) { in net_JNI_OnLoad()
47 JNU_ThrowByName(env, "java/lang/UnsatisfiedLinkError", in net_JNI_OnLoad()
60 parseExclusiveBindProperty(env); in net_JNI_OnLoad()
80 jobject getInet6Address_scopeifname(JNIEnv *env, jobject iaObj) { in getInet6Address_scopeifname() argument
84 holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); in getInet6Address_scopeifname()
86 return (*env)->GetObjectField(env, holder, ia6_scopeifnameID); in getInet6Address_scopeifname()
89 int setInet6Address_scopeifname(JNIEnv *env, jobject iaObj, jobject scopeifname) { in setInet6Address_scopeifname() argument
93 holder = (*env)->GetObjectField(env, iaObj, ia6_holder6ID); in setInet6Address_scopeifname()
95 (*env)->SetObjectField(env, holder, ia6_scopeifnameID, scopeifname); in setInet6Address_scopeifname()
[all …]
DDeflater.c51 static void Deflater_initIDs(JNIEnv *env) { in Deflater_initIDs() argument
52 jclass cls = (*env)->FindClass(env, "java/util/zip/Deflater"); in Deflater_initIDs()
53 levelID = (*env)->GetFieldID(env, cls, "level", "I"); in Deflater_initIDs()
54 strategyID = (*env)->GetFieldID(env, cls, "strategy", "I"); in Deflater_initIDs()
55 setParamsID = (*env)->GetFieldID(env, cls, "setParams", "Z"); in Deflater_initIDs()
56 finishID = (*env)->GetFieldID(env, cls, "finish", "Z"); in Deflater_initIDs()
57 finishedID = (*env)->GetFieldID(env, cls, "finished", "Z"); in Deflater_initIDs()
58 bufID = (*env)->GetFieldID(env, cls, "buf", "[B"); in Deflater_initIDs()
59 offID = (*env)->GetFieldID(env, cls, "off", "I"); in Deflater_initIDs()
60 lenID = (*env)->GetFieldID(env, cls, "len", "I"); in Deflater_initIDs()
[all …]
DInflater.c44 #define ThrowDataFormatException(env, msg) \ argument
45 JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg)
51 static void Inflater_initIDs(JNIEnv *env) { in Inflater_initIDs() argument
52 jclass cls = (*env)->FindClass(env, "java/util/zip/Inflater"); in Inflater_initIDs()
53 needDictID = (*env)->GetFieldID(env, cls, "needDict", "Z"); in Inflater_initIDs()
54 finishedID = (*env)->GetFieldID(env, cls, "finished", "Z"); in Inflater_initIDs()
55 bufID = (*env)->GetFieldID(env, cls, "buf", "[B"); in Inflater_initIDs()
56 offID = (*env)->GetFieldID(env, cls, "off", "I"); in Inflater_initIDs()
57 lenID = (*env)->GetFieldID(env, cls, "len", "I"); in Inflater_initIDs()
61 Inflater_init(JNIEnv *env, jclass cls, jboolean nowrap) in Inflater_init() argument
[all …]
DObjectStreamClass.c36 static void ObjectStreamClass_initNative(JNIEnv *env) in ObjectStreamClass_initNative() argument
38 jclass cl = (*env)->FindClass(env, "java/lang/NoSuchMethodError"); in ObjectStreamClass_initNative()
42 noSuchMethodErrCl = (*env)->NewGlobalRef(env, cl); in ObjectStreamClass_initNative()
57 ObjectStreamClass_hasStaticInitializer(JNIEnv *env, jclass this, in ObjectStreamClass_hasStaticInitializer() argument
68 (*env)->GetStaticMethodID(env, clazz, "<clinit>", "()V"); in ObjectStreamClass_hasStaticInitializer()
70 jthrowable th = (*env)->ExceptionOccurred(env); in ObjectStreamClass_hasStaticInitializer()
71 (*env)->ExceptionClear(env); /* normal return */ in ObjectStreamClass_hasStaticInitializer()
72 if (!(*env)->IsInstanceOf(env, th, noSuchMethodErrCl)) { in ObjectStreamClass_hasStaticInitializer()
73 (*env)->Throw(env, th); in ObjectStreamClass_hasStaticInitializer()
96 if ((superCl = (*env)->GetSuperclass(env, clazz)) == NULL) { in ObjectStreamClass_hasStaticInitializer()
[all …]
DUnixNativeDispatcher.c169 static void throwUnixException(JNIEnv* env, int errnum) { in throwUnixException() argument
170 jobject x = JNU_NewObjectByName(env, "sun/nio/fs/UnixException", in throwUnixException()
173 (*env)->Throw(env, x); in throwUnixException()
181 Java_sun_nio_fs_UnixNativeDispatcher_init(JNIEnv* env, jclass this) in Java_sun_nio_fs_UnixNativeDispatcher_init() argument
186 clazz = (*env)->FindClass(env, "sun/nio/fs/UnixFileAttributes"); in Java_sun_nio_fs_UnixNativeDispatcher_init()
188 attrs_st_mode = (*env)->GetFieldID(env, clazz, "st_mode", "I"); in Java_sun_nio_fs_UnixNativeDispatcher_init()
190 attrs_st_ino = (*env)->GetFieldID(env, clazz, "st_ino", "J"); in Java_sun_nio_fs_UnixNativeDispatcher_init()
192 attrs_st_dev = (*env)->GetFieldID(env, clazz, "st_dev", "J"); in Java_sun_nio_fs_UnixNativeDispatcher_init()
194 attrs_st_rdev = (*env)->GetFieldID(env, clazz, "st_rdev", "J"); in Java_sun_nio_fs_UnixNativeDispatcher_init()
196 attrs_st_nlink = (*env)->GetFieldID(env, clazz, "st_nlink", "I"); in Java_sun_nio_fs_UnixNativeDispatcher_init()
[all …]
Djni_util.h49 JNU_ThrowByName(JNIEnv *env, const char *name, const char *msg);
53 JNU_ThrowNullPointerException(JNIEnv *env, const char *msg);
56 JNU_ThrowArrayIndexOutOfBoundsException(JNIEnv *env, const char *msg);
59 JNU_ThrowOutOfMemoryError(JNIEnv *env, const char *msg);
62 JNU_ThrowIllegalArgumentException(JNIEnv *env, const char *msg);
65 JNU_ThrowIllegalAccessError(JNIEnv *env, const char *msg);
68 JNU_ThrowIllegalAccessException(JNIEnv *env, const char *msg);
71 JNU_ThrowInternalError(JNIEnv *env, const char *msg);
74 JNU_ThrowIOException(JNIEnv *env, const char *msg);
77 JNU_ThrowNoSuchFieldException(JNIEnv *env, const char *msg);
[all …]
DZipFile.c61 static void ZipFile_initIDs(JNIEnv *env) in ZipFile_initIDs() argument
63 jclass cls = (*env)->FindClass(env, "java/util/zip/ZipFile"); in ZipFile_initIDs()
64 jzfileID = (*env)->GetFieldID(env, cls, "jzfile", "J"); in ZipFile_initIDs()
70 ThrowZipException(JNIEnv *env, const char *msg) in ThrowZipException() argument
76 s = JNU_NewStringPlatform(env, msg); in ThrowZipException()
78 x = JNU_NewObjectByName(env, in ThrowZipException()
82 (*env)->Throw(env, x); in ThrowZipException()
87 ZipFile_open(JNIEnv *env, jclass cls, jstring name, in ZipFile_open() argument
91 const char *path = JNU_GetStringPlatformChars(env, name, 0); in ZipFile_open()
106 zfd = winFileHandleOpen(env, name, flag); in ZipFile_open()
[all …]
DInetAddress.c46 static void InetAddress_init(JNIEnv *env) { in InetAddress_init() argument
47 jclass c = (*env)->FindClass(env,"java/net/InetAddress"); in InetAddress_init()
49 ia_class = (*env)->NewGlobalRef(env, c); in InetAddress_init()
51 c = (*env)->FindClass(env,"java/net/InetAddress$InetAddressHolder"); in InetAddress_init()
53 iac_class = (*env)->NewGlobalRef(env, c); in InetAddress_init()
54 …ia_holderID = (*env)->GetFieldID(env, ia_class, "holder", "Ljava/net/InetAddress$InetAddressHolder… in InetAddress_init()
57 iac_addressID = (*env)->GetFieldID(env, iac_class, "address", "I"); in InetAddress_init()
59 iac_familyID = (*env)->GetFieldID(env, iac_class, "family", "I"); in InetAddress_init()
61 iac_hostNameID = (*env)->GetFieldID(env, iac_class, "hostName", "Ljava/lang/String;"); in InetAddress_init()
63 … iac_origHostNameID = (*env)->GetFieldID(env, iac_class, "originalHostName", "Ljava/lang/String;"); in InetAddress_init()
[all …]
DInet6Address.c47 static void Inet6Address_init(JNIEnv *env) { in Inet6Address_init() argument
49 jclass c = (*env)->FindClass(env, "java/net/Inet6Address"); in Inet6Address_init()
51 ia6_class = (*env)->NewGlobalRef(env, c); in Inet6Address_init()
53 ia6h_class = (*env)->FindClass(env, "java/net/Inet6Address$Inet6AddressHolder"); in Inet6Address_init()
55 …ia6_holder6ID = (*env)->GetFieldID(env, ia6_class, "holder6", "Ljava/net/Inet6Address$Inet6Address… in Inet6Address_init()
57 ia6_ipaddressID = (*env)->GetFieldID(env, ia6h_class, "ipaddress", "[B"); in Inet6Address_init()
59 ia6_scopeidID = (*env)->GetFieldID(env, ia6h_class, "scope_id", "I"); in Inet6Address_init()
61 ia6_scopeidsetID = (*env)->GetFieldID(env, ia6h_class, "scope_id_set", "Z"); in Inet6Address_init()
63 …ia6_scopeifnameID = (*env)->GetFieldID(env, ia6h_class, "scope_ifname", "Ljava/net/NetworkInterfac… in Inet6Address_init()
65 ia6_ctrID = (*env)->GetMethodID(env, ia6_class, "<init>", "()V"); in Inet6Address_init()
[all …]
DLinuxNativeDispatcher.c54 static void throwUnixException(JNIEnv* env, int errnum) { in throwUnixException() argument
55 jobject x = JNU_NewObjectByName(env, "sun/nio/fs/UnixException", in throwUnixException()
58 (*env)->Throw(env, x); in throwUnixException()
63 Java_sun_nio_fs_LinuxNativeDispatcher_init(JNIEnv *env, jclass clazz) in Java_sun_nio_fs_LinuxNativeDispatcher_init() argument
70 clazz = (*env)->FindClass(env, "sun/nio/fs/UnixMountEntry"); in Java_sun_nio_fs_LinuxNativeDispatcher_init()
72 entry_name = (*env)->GetFieldID(env, clazz, "name", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init()
74 entry_dir = (*env)->GetFieldID(env, clazz, "dir", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init()
76 entry_fstype = (*env)->GetFieldID(env, clazz, "fstype", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init()
78 entry_options = (*env)->GetFieldID(env, clazz, "opts", "[B"); in Java_sun_nio_fs_LinuxNativeDispatcher_init()
83 Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0(JNIEnv* env, jclass clazz, in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0() argument
[all …]
DDatagramChannelImpl.c61 Java_sun_nio_ch_DatagramChannelImpl_initIDs(JNIEnv *env, jclass clazz) in Java_sun_nio_ch_DatagramChannelImpl_initIDs() argument
63 clazz = (*env)->FindClass(env, "java/net/InetSocketAddress"); in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
65 isa_class = (*env)->NewGlobalRef(env, clazz); in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
67 JNU_ThrowOutOfMemoryError(env, NULL); in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
70 isa_ctorID = (*env)->GetMethodID(env, clazz, "<init>", in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
74 clazz = (*env)->FindClass(env, "sun/nio/ch/DatagramChannelImpl"); in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
76 dci_senderID = (*env)->GetFieldID(env, clazz, "sender", in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
79 dci_senderAddrID = (*env)->GetFieldID(env, clazz, in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
83 dci_senderPortID = (*env)->GetFieldID(env, clazz, in Java_sun_nio_ch_DatagramChannelImpl_initIDs()
89 Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this, in Java_sun_nio_ch_DatagramChannelImpl_disconnect0() argument
[all …]
Dio_util.c40 readSingle(JNIEnv *env, jobject this, jfieldID fid) { in readSingle() argument
45 JNU_ThrowIOException(env, "Stream Closed"); in readSingle()
52 JNU_ThrowIOExceptionWithLastError(env, "Read error"); in readSingle()
54 JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); in readSingle()
68 outOfBounds(JNIEnv *env, jint off, jint len, jbyteArray array) { in outOfBounds() argument
73 ((*env)->GetArrayLength(env, array) - off < len)); in outOfBounds()
77 readBytes(JNIEnv *env, jobject this, jbyteArray bytes, in readBytes() argument
86 JNU_ThrowNullPointerException(env, NULL); in readBytes()
90 if (outOfBounds(env, off, len, bytes)) { in readBytes()
91 JNU_ThrowByName(env, "java/lang/IndexOutOfBoundsException", NULL); in readBytes()
[all …]
DServerSocketChannelImpl.c61 Java_sun_nio_ch_ServerSocketChannelImpl_initIDs(JNIEnv *env, jclass c) in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs() argument
65 cls = (*env)->FindClass(env, "java/io/FileDescriptor"); in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs()
67 fd_fdID = (*env)->GetFieldID(env, cls, "descriptor", "I"); in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs()
70 cls = (*env)->FindClass(env, "java/net/InetSocketAddress"); in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs()
72 isa_class = (*env)->NewGlobalRef(env, cls); in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs()
74 JNU_ThrowOutOfMemoryError(env, NULL); in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs()
77 isa_ctorID = (*env)->GetMethodID(env, cls, "<init>", in Java_sun_nio_ch_ServerSocketChannelImpl_initIDs()
83 Java_sun_nio_ch_ServerSocketChannelImpl_accept0(JNIEnv *env, jobject this, in Java_sun_nio_ch_ServerSocketChannelImpl_accept0() argument
87 jint ssfd = (*env)->GetIntField(env, ssfdo, fd_fdID); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0()
97 JNU_ThrowOutOfMemoryError(env, NULL); in Java_sun_nio_ch_ServerSocketChannelImpl_accept0()
[all …]
DProcessEnvironment_md.c41 ProcessEnvironment_environ(JNIEnv *env, jclass ign) in ProcessEnvironment_environ() argument
56 jclass byteArrCls = (*env)->FindClass(env, "[B"); in ProcessEnvironment_environ()
64 result = (*env)->NewObjectArray(env, 2*count, byteArrCls, 0); in ProcessEnvironment_environ()
75 var = (*env)->NewByteArray(env, varLength); in ProcessEnvironment_environ()
77 val = (*env)->NewByteArray(env, valLength); in ProcessEnvironment_environ()
79 (*env)->SetByteArrayRegion(env, var, 0, varLength, in ProcessEnvironment_environ()
81 (*env)->SetByteArrayRegion(env, val, 0, valLength, in ProcessEnvironment_environ()
83 (*env)->SetObjectArrayElement(env, result, 2*j , var); in ProcessEnvironment_environ()
84 (*env)->SetObjectArrayElement(env, result, 2*j+1, val); in ProcessEnvironment_environ()
85 (*env)->DeleteLocalRef(env, var); in ProcessEnvironment_environ()
[all …]

12345