Searched defs:env (Results 1 - 25 of 97) sorted by relevance

1234

/libcore/ojluni/src/main/native/
H A DRegister.cpp37 extern void register_java_io_Console(JNIEnv* env);
61 extern void register_java_nio_Bits(JNIEnv* env);
62 extern void register_java_nio_MappedByteBuffer(JNIEnv* env);
63 extern void register_java_util_zip_Adler32(JNIEnv* env);
78 extern void register_sun_nio_ch_SocketChannelImpl(JNIEnv* env);
87 jint JNI_OnLoad(JavaVM* vm, void*) { JNIEnv* env; local
88 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
93 ScopedLocalFrame localFrame(env);
94 register_java_util_zip_ZipFile(env);
95 register_java_util_zip_Inflater(env);
[all...]
H A DInet4Address.c40 static void Inet4Address_init(JNIEnv *env) { argument
41 jclass c = (*env)->FindClass(env, "java/net/Inet4Address");
43 ia4_class = (*env)->NewGlobalRef(env, c);
45 ia4_ctrID = (*env)->GetMethodID(env, ia4_class, "<init>", "()V");
49 void register_java_net_Inet4Address(JNIEnv* env) { argument
50 Inet4Address_init(env);
H A DString.c34 String_intern(JNIEnv *env, jobject this) argument
36 return JVM_InternString(env, this);
42 void register_java_lang_String(JNIEnv* env) { argument
43 jniRegisterNativeMethods(env, "java/lang/String", gMethods, NELEM(gMethods));
H A DUnixAsynchronousSocketChannelImpl.c39 Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect(JNIEnv *env, argument
48 JNU_ThrowIOExceptionWithLastError(env, "getsockopt");
51 handleSocketError(env, error);
H A Dsocket_tagger_util.cpp26 int tagSocket(JNIEnv* env, int fd) { argument
27 if (env->ExceptionOccurred()) { return fd; }
28 jmethodID get = env->GetStaticMethodID(JniConstants::socketTaggerClass,
31 env->CallStaticObjectMethod(JniConstants::socketTaggerClass, get);
32 jmethodID tag = env->GetMethodID(JniConstants::socketTaggerClass,
35 jobject fileDescriptor = jniCreateFileDescriptor(env, fd);
36 env->CallVoidMethod(socketTagger, tag, fileDescriptor);
H A DThread.c60 void register_java_lang_Thread(JNIEnv* env) { argument
61 jclass cls = (*env)->FindClass(env, "java/lang/Thread");
62 (*env)->RegisterNatives(env, cls, methods, ARRAY_LENGTH(methods));
H A DThrowable.c50 Throwable_fillInStackTrace(JNIEnv *env, jobject throwable, int dummy) argument
52 JVM_FillInStackTrace(env, throwable);
57 Throwable_getStackTraceDepth(JNIEnv *env, jobject throwable) argument
59 return JVM_GetStackTraceDepth(env, throwable);
63 Throwable_getStackTraceElement(JNIEnv *env, argument
66 return JVM_GetStackTraceElement(env, throwable, index);
74 void register_java_lang_Throwable(JNIEnv* env) { argument
75 jniRegisterNativeMethods(env, "java/lang/Throwable", gMethods, NELEM(gMethods));
H A DUnixAsynchronousServerSocketChannelImpl.c28 extern void Java_sun_nio_ch_ServerSocketChannelImpl_initIDs(JNIEnv* env,
31 extern jint Java_sun_nio_ch_ServerSocketChannelImpl_accept0(JNIEnv* env,
35 Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs(JNIEnv* env, argument
38 Java_sun_nio_ch_ServerSocketChannelImpl_initIDs(env, c);
42 Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0(JNIEnv* env, argument
45 return Java_sun_nio_ch_ServerSocketChannelImpl_accept0(env, this,
H A DAdler32.c42 Java_java_util_zip_Adler32_update(JNIEnv *env, jclass cls, jint adler, jint b) argument
51 Java_java_util_zip_Adler32_updateBytes(JNIEnv *env, jclass cls, jint adler, argument
54 Bytef *buf = (*env)->GetPrimitiveArrayCritical(env, b, 0);
57 (*env)->ReleasePrimitiveArrayCritical(env, b, buf, 0);
63 Java_java_util_zip_Adler32_updateByteBuffer(JNIEnv *env, jclass cls, jint adler, argument
79 void register_java_util_zip_Adler32(JNIEnv* env) { argument
80 jniRegisterNativeMethods(env, "java/util/zip/Adler32", gMethods, NELEM(gMethods));
H A DConsole_md.c40 Java_java_io_Console_istty(JNIEnv *env, jclass cls) argument
46 Java_java_io_Console_encoding(JNIEnv *env, jclass cls) argument
52 Java_java_io_Console_echo(JNIEnv *env, argument
60 JNU_ThrowIOExceptionWithLastError(env, "tcgetattr failed");
70 JNU_ThrowIOExceptionWithLastError(env, "tcsetattr failed");
81 void register_java_io_Console(JNIEnv* env) { argument
82 jniRegisterNativeMethods(env, "java/io/Console", gMethods, NELEM(gMethods));
/libcore/luni/src/main/native/
H A Djava_lang_invoke_MethodHandle.cpp20 static void MethodHandle_invokeExact(JNIEnv* env, jobject, jobjectArray) { argument
21 jniThrowException(env, "java/lang/UnsupportedOperationException",
25 static void MethodHandle_invoke(JNIEnv* env, jobject, jobjectArray) { argument
26 jniThrowException(env, "java/lang/UnsupportedOperationException",
35 void register_java_lang_invoke_MethodHandle(JNIEnv* env) { argument
36 jniRegisterNativeMethods(env, "java/lang/invoke/MethodHandle", gMethods, NELEM(gMethods));
H A DRegister.cpp29 JNIEnv* env; local
30 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
34 JniConstants::init(env);
36 ScopedLocalFrame localFrame(env);
38 #define REGISTER(FN) extern void FN(JNIEnv*); FN(env)
64 JNIEnv* env; local
65 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
71 ScopedLocalFrame localFrame(env);
73 #define UNREGISTER(FN) extern void FN(JNIEnv*); FN(env)
H A Dlibcore_io_AsynchronousCloseMonitor.cpp25 static void AsynchronousCloseMonitor_signalBlockedThreads(JNIEnv* env, jclass, jobject javaFd) { argument
26 int fd = jniGetFDFromFileDescriptor(env, javaFd);
33 void register_libcore_io_AsynchronousCloseMonitor(JNIEnv* env) { argument
35 jniRegisterNativeMethods(env, "libcore/io/AsynchronousCloseMonitor", gMethods, NELEM(gMethods));
H A Dsun_misc_Unsafe.cpp22 static jobject Unsafe_allocateInstance(JNIEnv* env, jclass, jclass c) { argument
23 return env->AllocObject(c);
29 void register_sun_misc_Unsafe(JNIEnv* env) { argument
30 jniRegisterNativeMethods(env, "sun/misc/Unsafe", gMethods, NELEM(gMethods));
H A DExecStrings.cpp27 ExecStrings::ExecStrings(JNIEnv* env, jobjectArray java_string_array) argument
28 : env_(env), java_array_(java_string_array), array_(NULL) {
H A DJniException.cpp22 void jniThrowExceptionWithErrno(JNIEnv* env, const char* exceptionClassName, int error) { argument
24 jniThrowException(env, exceptionClassName, jniStrError(error, buf, sizeof(buf)));
27 void jniThrowOutOfMemoryError(JNIEnv* env, const char* message) { argument
28 jniThrowException(env, "java/lang/OutOfMemoryError", message);
31 void jniThrowSocketException(JNIEnv* env, int error) { argument
32 jniThrowExceptionWithErrno(env, "java/net/SocketException", error);
H A Dandroid_system_OsConstants.cpp60 static void initConstant(JNIEnv* env, jclass c, const char* fieldName, int value) { argument
61 jfieldID field = env->GetStaticFieldID(c, fieldName, "I");
62 env->SetStaticIntField(c, field, value);
65 static void OsConstants_initConstants(JNIEnv* env, jclass c) { argument
66 initConstant(env, c, "AF_INET", AF_INET);
67 initConstant(env, c, "AF_INET6", AF_INET6);
68 initConstant(env, c, "AF_PACKET", AF_PACKET);
69 initConstant(env, c, "AF_NETLINK", AF_NETLINK);
70 initConstant(env, c, "AF_UNIX", AF_UNIX);
71 initConstant(env,
706 register_android_system_OsConstants(JNIEnv* env) argument
[all...]
H A Dlibcore_util_NativeAllocationRegistry.cpp35 void register_libcore_util_NativeAllocationRegistry(JNIEnv* env) { argument
36 jniRegisterNativeMethods(env, "libcore/util/NativeAllocationRegistry",
H A DIcuUtilities.cpp32 jobjectArray fromStringEnumeration(JNIEnv* env, UErrorCode& status, const char* provider, icu::StringEnumeration* se) { argument
33 if (maybeThrowIcuException(env, provider, status)) {
38 if (maybeThrowIcuException(env, "StringEnumeration::count", status)) {
42 jobjectArray result = env->NewObjectArray(count, JniConstants::stringClass, NULL);
45 if (maybeThrowIcuException(env, "StringEnumeration::snext", status)) {
48 ScopedLocalRef<jstring> javaString(env, jniCreateString(env, string->getBuffer(), string->length()));
49 env->SetObjectArrayElement(result, i, javaString.get());
54 bool maybeThrowIcuException(JNIEnv* env, const char* function, UErrorCode error) { argument
68 jniThrowExceptionFmt(env, exceptionClas
[all...]
H A DNetFd.h27 NetFd(JNIEnv* env, jobject fileDescriptor) argument
28 : mEnv(env), mFileDescriptor(fileDescriptor), mFd(-1)
/libcore/luni/src/test/native/
H A Dlibcore_java_nio_BufferTest.cpp21 JNIEnv* env, jobject /* clazz */, jobject buffer) {
22 return reinterpret_cast<jlong>(env->GetDirectBufferAddress(buffer));
26 JNIEnv* env, jobject /* clazz */, jobject buffer) {
27 return reinterpret_cast<jlong>(env->GetDirectBufferCapacity(buffer));
31 JNIEnv* env, jobject /* clazz */) {
34 return env->NewDirectByteBuffer(nullptr, 0);
20 Java_libcore_java_nio_BufferTest_jniGetDirectBufferAddress( JNIEnv* env, jobject , jobject buffer) argument
25 Java_libcore_java_nio_BufferTest_jniGetDirectBufferCapacity( JNIEnv* env, jobject , jobject buffer) argument
30 Java_libcore_java_nio_BufferTest_jniNewDirectByteBuffer( JNIEnv* env, jobject ) argument
H A Dlibcore_java_io_FileTest.cpp29 JNIEnv* env, jobject /* clazz */, jstring baseDir) {
30 ScopedUtfChars baseDirUtf(env, baseDir);
39 jniThrowIOException(env, errno);
42 jniThrowException(env, "java/lang/IllegalStateException", "expected dir");
47 jniThrowIOException(env, errno);
51 jniThrowException(env, "java/lang/IllegalStateException", "expected file");
28 Java_libcore_java_io_FileTest_nativeTestFilesWithSurrogatePairs( JNIEnv* env, jobject , jstring baseDir) argument
/libcore/include/
H A DScopedIcuLocale.h26 ScopedIcuLocale(JNIEnv* env, jstring javaLocaleName) : mEnv(env) { argument
34 const ScopedUtfChars localeName(env, javaLocaleName);
H A DScopedJavaUnicodeString.h28 ScopedJavaUnicodeString(JNIEnv* env, jstring s) : mEnv(env), mString(s) { argument
32 mChars = env->GetStringChars(mString, NULL);
33 const int32_t charCount = env->GetStringLength(mString);
/libcore/ojluni/src/main/java/java/nio/file/
H A DFileSystems.java245 * Map&lt;String,String&gt; env = new HashMap&lt;&gt;();
246 * env.put("capacity", "16G");
247 * env.put("blockSize", "4k");
248 * FileSystem fs = FileSystems.newFileSystem(URI.create("memory:///?name=logfs"), env);
253 * @param env
261 * or the {@code env} parameter does not contain properties required
273 public static FileSystem newFileSystem(URI uri, Map<String,?> env) argument
276 return newFileSystem(uri, env, null);
292 * @param env
303 * or the {@code env} paramete
318 newFileSystem(URI uri, Map<String,?> env, ClassLoader loader) argument
[all...]

Completed in 7045 milliseconds

1234