Home
last modified time | relevance | path

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

123

/libcore/luni/src/main/native/
Dandroid_system_OsConstants.cpp53 static void initConstant(JNIEnv* env, jclass c, const char* fieldName, int value) { in initConstant() argument
54 jfieldID field = env->GetStaticFieldID(c, fieldName, "I"); in initConstant()
55 env->SetStaticIntField(c, field, value); in initConstant()
58 static void OsConstants_initConstants(JNIEnv* env, jclass c) { in OsConstants_initConstants() argument
59 initConstant(env, c, "AF_INET", AF_INET); in OsConstants_initConstants()
60 initConstant(env, c, "AF_INET6", AF_INET6); in OsConstants_initConstants()
61 initConstant(env, c, "AF_UNIX", AF_UNIX); in OsConstants_initConstants()
62 initConstant(env, c, "AF_UNSPEC", AF_UNSPEC); in OsConstants_initConstants()
63 initConstant(env, c, "AI_ADDRCONFIG", AI_ADDRCONFIG); in OsConstants_initConstants()
64 initConstant(env, c, "AI_ALL", AI_ALL); in OsConstants_initConstants()
[all …]
Dlibcore_io_Posix.cpp71 jstring NAME = env->NewStringUTF(EXP); \
153 static void throwException(JNIEnv* env, jclass exceptionClass, jmethodID ctor3, jmethodID ctor2, in throwException() argument
156 if (env->ExceptionCheck()) { in throwException()
157 cause = env->ExceptionOccurred(); in throwException()
158 env->ExceptionClear(); in throwException()
161 ScopedLocalRef<jstring> detailMessage(env, env->NewStringUTF(functionName)); in throwException()
165 env->ExceptionClear(); in throwException()
170 exception = env->NewObject(exceptionClass, ctor3, detailMessage.get(), error, cause); in throwException()
172 exception = env->NewObject(exceptionClass, ctor2, detailMessage.get(), error); in throwException()
174 env->Throw(reinterpret_cast<jthrowable>(exception)); in throwException()
[all …]
Dorg_apache_harmony_xml_ExpatParser.cpp70 void push(JNIEnv* env, jstring s) { in push() argument
75 jniThrowOutOfMemoryError(env, NULL); in push()
104 ParsingContext(jobject object) : env(NULL), object(object), buffer(NULL), bufferSize(-1) { in ParsingContext()
121 env->DeleteGlobalRef(current->interned); in ~ParsingContext()
139 jcharArray javaBuffer = env->NewCharArray(length); in ensureCapacity()
143 javaBuffer = reinterpret_cast<jcharArray>(env->NewGlobalRef(javaBuffer)); in ensureCapacity()
155 env->DeleteGlobalRef(buffer); in freeBuffer()
166 JNIEnv* env; member
254 static InternedString* newInternedString(JNIEnv* env, const char* bytes, int hash) { in newInternedString() argument
258 jniThrowOutOfMemoryError(env, NULL); in newInternedString()
[all …]
Dlibcore_icu_ICU.cpp100 static jstring ICU_addLikelySubtags(JNIEnv* env, jclass, jstring javaLocaleName) { in ICU_addLikelySubtags() argument
102 ScopedUtfChars localeID(env, javaLocaleName); in ICU_addLikelySubtags()
108 return env->NewStringUTF(maximizedLocaleID); in ICU_addLikelySubtags()
111 static jstring ICU_getScript(JNIEnv* env, jclass, jstring javaLocaleName) { in ICU_getScript() argument
112 ScopedIcuLocale icuLocale(env, javaLocaleName); in ICU_getScript()
116 return env->NewStringUTF(icuLocale.locale().getScript()); in ICU_getScript()
119 static jint ICU_getCurrencyFractionDigits(JNIEnv* env, jclass, jstring javaCurrencyCode) { in ICU_getCurrencyFractionDigits() argument
120 ScopedJavaUnicodeString currencyCode(env, javaCurrencyCode); in ICU_getCurrencyFractionDigits()
129 static jint ICU_getCurrencyNumericCode(JNIEnv* env, jclass, jstring javaCurrencyCode) { in ICU_getCurrencyNumericCode() argument
130 ScopedJavaUnicodeString currencyCode(env, javaCurrencyCode); in ICU_getCurrencyNumericCode()
[all …]
Djava_math_NativeBN.cpp42 static bool throwExceptionIfNecessary(JNIEnv* env) { in throwExceptionIfNecessary() argument
51 jniThrowException(env, "java/lang/ArithmeticException", "BigInteger division by zero"); in throwExceptionIfNecessary()
53 jniThrowException(env, "java/lang/ArithmeticException", "BigInteger not invertible"); in throwExceptionIfNecessary()
55 jniThrowOutOfMemoryError(env, message); in throwExceptionIfNecessary()
57 jniThrowException(env, "java/lang/ArithmeticException", message); in throwExceptionIfNecessary()
62 static int isValidHandle(JNIEnv* env, jlong handle, const char* message) { in isValidHandle() argument
64 jniThrowNullPointerException(env, message); in isValidHandle()
70 static int oneValidHandle(JNIEnv* env, jlong a) { in oneValidHandle() argument
71 return isValidHandle(env, a, "Mandatory handle (first) passed as null"); in oneValidHandle()
74 static int twoValidHandles(JNIEnv* env, jlong a, jlong b) { in twoValidHandles() argument
[all …]
DvalueOf.cpp24 static jobject valueOf(JNIEnv* env, jclass c, const char* signature, const T& value) { in valueOf() argument
25 static jmethodID valueOfMethod = env->GetStaticMethodID(c, "valueOf", signature); in valueOf()
26 return env->CallStaticObjectMethod(c, valueOfMethod, value); in valueOf()
29 jobject booleanValueOf(JNIEnv* env, jboolean value) { in booleanValueOf() argument
30 return valueOf(env, JniConstants::booleanClass, "(Z)Ljava/lang/Boolean;", value); in booleanValueOf()
33 jobject doubleValueOf(JNIEnv* env, jdouble value) { in doubleValueOf() argument
34 return valueOf(env, JniConstants::doubleClass, "(D)Ljava/lang/Double;", value); in doubleValueOf()
37 jobject integerValueOf(JNIEnv* env, jint value) { in integerValueOf() argument
38 return valueOf(env, JniConstants::integerClass, "(I)Ljava/lang/Integer;", value); in integerValueOf()
41 jobject longValueOf(JNIEnv* env, jlong value) { in longValueOf() argument
[all …]
Djava_io_ObjectStreamClass.cpp23 static jobject getSignature(JNIEnv* env, jclass c, jobject object) { in getSignature() argument
24 jmethodID mid = env->GetMethodID(c, "getSignature", "()Ljava/lang/String;"); in getSignature()
28 jclass objectClass = env->GetObjectClass(object); in getSignature()
29 return env->CallNonvirtualObjectMethod(object, objectClass, mid); in getSignature()
32 static jobject ObjectStreamClass_getFieldSignature(JNIEnv* env, jclass, jobject field) { in ObjectStreamClass_getFieldSignature() argument
33 return getSignature(env, JniConstants::fieldClass, field); in ObjectStreamClass_getFieldSignature()
36 static jobject ObjectStreamClass_getMethodSignature(JNIEnv* env, jclass, jobject method) { in ObjectStreamClass_getMethodSignature() argument
37 return getSignature(env, JniConstants::methodClass, method); in ObjectStreamClass_getMethodSignature()
40 static jobject ObjectStreamClass_getConstructorSignature(JNIEnv* env, jclass, jobject constructor) { in ObjectStreamClass_getConstructorSignature() argument
41 return getSignature(env, JniConstants::constructorClass, constructor); in ObjectStreamClass_getConstructorSignature()
[all …]
Djava_util_jar_StrictJarFile.cpp31 static void throwIoException(JNIEnv* env, const int32_t errorCode) { in throwIoException() argument
32 jniThrowException(env, "java/io/IOException", ErrorCodeString(errorCode)); in throwIoException()
44 static jobject constructString(JNIEnv* env, const char* name, const uint16_t nameLength) { in constructString() argument
45 jbyteArray javaNameBytes = env->NewByteArray(nameLength); in constructString()
49 env->SetByteArrayRegion(javaNameBytes, 0, nameLength, reinterpret_cast<const jbyte*>(name)); in constructString()
51 ScopedLocalRef<jclass> stringClass(env, env->FindClass("java/lang/String")); in constructString()
52 const jmethodID stringCtor = env->GetMethodID(stringClass.get(), "<init>", "([B)V"); in constructString()
53 return env->NewObject(stringClass.get(), stringCtor, javaNameBytes); in constructString()
56 static jobject newZipEntry(JNIEnv* env, const ZipEntry& entry, const jobject entryName, in newZipEntry() argument
58 ScopedLocalRef<jclass> zipEntryClass(env, env->FindClass("java/util/zip/ZipEntry")); in newZipEntry()
[all …]
Dlibcore_icu_NativeBreakIterator.cpp43 BreakIteratorAccessor(JNIEnv* env, jlong address, jstring javaInput, bool reset) { in BreakIteratorAccessor() argument
44 init(env, address); in BreakIteratorAccessor()
51 mChars = env->GetStringChars(mJavaInput, NULL); in BreakIteratorAccessor()
56 mUText = utext_openUChars(NULL, mChars, env->GetStringLength(mJavaInput), &mStatus); in BreakIteratorAccessor()
68 BreakIteratorAccessor(JNIEnv* env, jlong address) { in BreakIteratorAccessor() argument
69 init(env, address); in BreakIteratorAccessor()
89 void init(JNIEnv* env, jlong address) { in init() argument
90 mEnv = env; in init()
111 ScopedIcuLocale icuLocale(env, javaLocaleName); \
117 if (maybeThrowIcuException(env, "ubrk_open", status)) { \
[all …]
Dlibcore_icu_NativeCollation.cpp43 UErrorCode start(JNIEnv* env, jstring string, UCollator* collator) { in start() argument
44 release(env, false /* don't close the collator */); in start()
45 mChars = env->GetStringChars(string, NULL); in start()
47 mString = static_cast<jstring>(env->NewGlobalRef(string)); in start()
48 const size_t size = env->GetStringLength(string); in start()
65 void release(JNIEnv* env, bool closeCollator) { in release() argument
71 env->ReleaseStringChars(mString, mChars); in release()
72 env->DeleteGlobalRef(mString); in release()
96 static void NativeCollation_closeElements(JNIEnv* env, jclass, jlong address) { in NativeCollation_closeElements() argument
98 elements->release(env, true /* close collator */); in NativeCollation_closeElements()
[all …]
Dlibcore_icu_AlphabeticIndex.cpp32 static jlong AlphabeticIndex_create(JNIEnv* env, jclass, jstring javaLocaleName) { in AlphabeticIndex_create() argument
34 ScopedIcuLocale icuLocale(env, javaLocaleName); in AlphabeticIndex_create()
39 if (maybeThrowIcuException(env, "AlphabeticIndex", status)) { in AlphabeticIndex_create()
54 static void AlphabeticIndex_setMaxLabelCount(JNIEnv* env, jclass, jlong peer, jint count) { in AlphabeticIndex_setMaxLabelCount() argument
58 maybeThrowIcuException(env, "AlphabeticIndex::setMaxLabelCount", status); in AlphabeticIndex_setMaxLabelCount()
61 static void AlphabeticIndex_addLabels(JNIEnv* env, jclass, jlong peer, jstring javaLocaleName) { in AlphabeticIndex_addLabels() argument
63 ScopedIcuLocale icuLocale(env, javaLocaleName); in AlphabeticIndex_addLabels()
69 maybeThrowIcuException(env, "AlphabeticIndex::addLabels", status); in AlphabeticIndex_addLabels()
72 static void AlphabeticIndex_addLabelRange(JNIEnv* env, jclass, jlong peer, in AlphabeticIndex_addLabelRange() argument
77 maybeThrowIcuException(env, "AlphabeticIndex::addLabels", status); in AlphabeticIndex_addLabelRange()
[all …]
DNetworkUtilities.cpp31 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, jint* port) { in sockaddrToInetAddress() argument
46 return sockaddrToInetAddress(env, tmp, port); in sockaddrToInetAddress()
71 jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", in sockaddrToInetAddress()
79 ScopedLocalRef<jbyteArray> byteArray(env, env->NewByteArray(addressLength)); in sockaddrToInetAddress()
83 env->SetByteArrayRegion(byteArray.get(), 0, addressLength, in sockaddrToInetAddress()
90 … static jmethodID ctor = env->GetMethodID(JniConstants::inetUnixAddressClass, "<init>", "([B)V"); in sockaddrToInetAddress()
91 return env->NewObject(JniConstants::inetUnixAddressClass, ctor, byteArray.get()); in sockaddrToInetAddress()
94 static jmethodID getByAddressMethod = env->GetStaticMethodID(JniConstants::inetAddressClass, in sockaddrToInetAddress()
99 return env->CallStaticObjectMethod(JniConstants::inetAddressClass, getByAddressMethod, in sockaddrToInetAddress()
103 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument
[all …]
Dlibcore_icu_TimeZoneNames.cpp47 static bool setStringArrayElement(JNIEnv* env, jobjectArray array, int i, const UnicodeString& s) { in setStringArrayElement() argument
54 ScopedLocalRef<jstring> javaString(env, env->NewString(s.getBuffer(), s.length())); in setStringArrayElement()
58 env->SetObjectArrayElement(array, i, javaString.get()); in setStringArrayElement()
63 static void TimeZoneNames_fillZoneStrings(JNIEnv* env, jclass, jstring javaLocaleName, jobjectArray… in TimeZoneNames_fillZoneStrings() argument
64 ScopedIcuLocale icuLocale(env, javaLocaleName); in TimeZoneNames_fillZoneStrings()
71 if (maybeThrowIcuException(env, "TimeZoneNames::createInstance", status)) { in TimeZoneNames_fillZoneStrings()
79 size_t id_count = env->GetArrayLength(result); in TimeZoneNames_fillZoneStrings()
81 ScopedLocalRef<jobjectArray> java_row(env, in TimeZoneNames_fillZoneStrings()
82 … reinterpret_cast<jobjectArray>(env->GetObjectArrayElement(result, i))); in TimeZoneNames_fillZoneStrings()
83 ScopedLocalRef<jstring> java_zone_id(env, in TimeZoneNames_fillZoneStrings()
[all …]
Djava_util_regex_Matcher.cpp45 MatcherAccessor(JNIEnv* env, jlong address, jstring javaInput, bool reset) { in MatcherAccessor() argument
46 init(env, address); in MatcherAccessor()
49 mChars = env->GetStringChars(mJavaInput, NULL); in MatcherAccessor()
54 mUText = utext_openUChars(NULL, mChars, env->GetStringLength(mJavaInput), &mStatus); in MatcherAccessor()
66 MatcherAccessor(JNIEnv* env, jlong address) { in MatcherAccessor() argument
67 init(env, address); in MatcherAccessor()
99 void init(JNIEnv* env, jlong address) { in init() argument
100 mEnv = env; in init()
124 static jint Matcher_findImpl(JNIEnv* env, jclass, jlong addr, jstring javaText, jint startIndex, ji… in Matcher_findImpl() argument
125 MatcherAccessor matcher(env, addr, javaText, false); in Matcher_findImpl()
[all …]
Djava_util_zip_Inflater.cpp27 static jlong Inflater_createStream(JNIEnv* env, jobject, jboolean noHeader) { in Inflater_createStream() argument
30 jniThrowOutOfMemoryError(env, NULL); in Inflater_createStream()
45 throwExceptionForZlibError(env, "java/lang/IllegalArgumentException", err, jstream.get()); in Inflater_createStream()
51 static void Inflater_setInputImpl(JNIEnv* env, jobject, jbyteArray buf, jint off, jint len, jlong h… in Inflater_setInputImpl() argument
52 toNativeZipStream(handle)->setInput(env, buf, off, len); in Inflater_setInputImpl()
55 static jint Inflater_setFileInputImpl(JNIEnv* env, jobject, jobject javaFileDescriptor, jlong off, … in Inflater_setFileInputImpl() argument
61 stream->setInput(env, NULL, 0, len); in Inflater_setFileInputImpl()
70 int fd = jniGetFDFromFileDescriptor(env, javaFileDescriptor); in Inflater_setFileInputImpl()
73 jniThrowIOException(env, errno); in Inflater_setFileInputImpl()
85 jniThrowIOException(env, errno); in Inflater_setFileInputImpl()
[all …]
Dlibcore_icu_NativeDecimalFormat.cpp50 static DecimalFormatSymbols* makeDecimalFormatSymbols(JNIEnv* env, in makeDecimalFormatSymbols() argument
56 ScopedJavaUnicodeString currencySymbol(env, currencySymbol0); in makeDecimalFormatSymbols()
57 ScopedJavaUnicodeString exponentSeparator(env, exponentSeparator0); in makeDecimalFormatSymbols()
58 ScopedJavaUnicodeString infinity(env, infinity0); in makeDecimalFormatSymbols()
59 ScopedJavaUnicodeString internationalCurrencySymbol(env, internationalCurrencySymbol0); in makeDecimalFormatSymbols()
60 ScopedJavaUnicodeString nan(env, nan0); in makeDecimalFormatSymbols()
61 ScopedJavaUnicodeString minusSign(env, minusSign0); in makeDecimalFormatSymbols()
62 ScopedJavaUnicodeString percent(env, percent0); in makeDecimalFormatSymbols()
95 static void NativeDecimalFormat_setDecimalFormatSymbols(JNIEnv* env, jclass, jlong addr, in NativeDecimalFormat_setDecimalFormatSymbols() argument
101 DecimalFormatSymbols* symbols = makeDecimalFormatSymbols(env, in NativeDecimalFormat_setDecimalFormatSymbols()
[all …]
Dlibcore_icu_NativeConverter.cpp64 static bool collectStandardNames(JNIEnv* env, const char* canonicalName, const char* standard, in collectStandardNames() argument
68 if (maybeThrowIcuException(env, "ucnv_openStandardNames", status)) { in collectStandardNames()
73 if (maybeThrowIcuException(env, "StringEnumeration::count", status)) { in collectStandardNames()
79 if (maybeThrowIcuException(env, "StringEnumeration::snext", status)) { in collectStandardNames()
122 static jstring getJavaCanonicalName(JNIEnv* env, const char* icuCanonicalName) { in getJavaCanonicalName() argument
128 return env->NewStringUTF(cName); in getJavaCanonicalName()
130 return env->NewStringUTF(cName); in getJavaCanonicalName()
139 return env->NewStringUTF(name); in getJavaCanonicalName()
156 return env->NewStringUTF(&result[0]); in getJavaCanonicalName()
159 static jlong NativeConverter_openConverter(JNIEnv* env, jclass, jstring converterName) { in NativeConverter_openConverter() argument
[all …]
DIcuUtilities.cpp31 jobjectArray fromStringEnumeration(JNIEnv* env, UErrorCode& status, const char* provider, StringEnu… in fromStringEnumeration() argument
32 if (maybeThrowIcuException(env, provider, status)) { in fromStringEnumeration()
37 if (maybeThrowIcuException(env, "StringEnumeration::count", status)) { in fromStringEnumeration()
41 jobjectArray result = env->NewObjectArray(count, JniConstants::stringClass, NULL); in fromStringEnumeration()
44 if (maybeThrowIcuException(env, "StringEnumeration::snext", status)) { in fromStringEnumeration()
47 ScopedLocalRef<jstring> javaString(env, env->NewString(string->getBuffer(), string->length())); in fromStringEnumeration()
48 env->SetObjectArrayElement(result, i, javaString.get()); in fromStringEnumeration()
53 bool maybeThrowIcuException(JNIEnv* env, const char* function, UErrorCode error) { in maybeThrowIcuException() argument
67 jniThrowExceptionFmt(env, exceptionClass, "%s failed: %s", function, u_errorName(error)); in maybeThrowIcuException()
Djava_text_Bidi.cpp76 static void Bidi_ubidi_setPara(JNIEnv* env, jclass, jlong ptr, jcharArray text, jint length, jint p… in Bidi_ubidi_setPara() argument
82 env->GetByteArrayRegion(newEmbeddingLevels, 0, length, dst); in Bidi_ubidi_setPara()
86 ScopedCharArrayRO chars(env, text); in Bidi_ubidi_setPara()
92 maybeThrowIcuException(env, "ubidi_setPara", err); in Bidi_ubidi_setPara()
95 static jlong Bidi_ubidi_setLine(JNIEnv* env, jclass, jlong ptr, jint start, jint limit) { in Bidi_ubidi_setLine() argument
98 if (maybeThrowIcuException(env, "ubidi_openSized", status)) { in Bidi_ubidi_setLine()
103 maybeThrowIcuException(env, "ubidi_setLine", status); in Bidi_ubidi_setLine()
119 static jbyteArray Bidi_ubidi_getLevels(JNIEnv* env, jclass, jlong ptr) { in Bidi_ubidi_getLevels() argument
122 if (maybeThrowIcuException(env, "ubidi_getLevels", status)) { in Bidi_ubidi_getLevels()
126 jbyteArray result = env->NewByteArray(len); in Bidi_ubidi_getLevels()
[all …]
Djava_util_zip_Deflater.cpp26 static void Deflater_setDictionaryImpl(JNIEnv* env, jobject, jbyteArray dict, int off, int len, jlo… in Deflater_setDictionaryImpl() argument
27 toNativeZipStream(handle)->setDictionary(env, dict, off, len, false); in Deflater_setDictionaryImpl()
42 static jlong Deflater_createStream(JNIEnv * env, jobject, jint level, jint strategy, jboolean noHea… in Deflater_createStream() argument
45 jniThrowOutOfMemoryError(env, NULL); in Deflater_createStream()
61 throwExceptionForZlibError(env, "java/lang/IllegalArgumentException", err, jstream.get()); in Deflater_createStream()
67 static void Deflater_setInputImpl(JNIEnv* env, jobject, jbyteArray buf, jint off, jint len, jlong h… in Deflater_setInputImpl() argument
68 toNativeZipStream(handle)->setInput(env, buf, off, len); in Deflater_setInputImpl()
71 static jint Deflater_deflateImpl(JNIEnv* env, jobject recv, jbyteArray buf, int off, int len, jlong… in Deflater_deflateImpl() argument
73 ScopedByteArrayRW out(env, buf); in Deflater_deflateImpl()
88 static jfieldID finished = env->GetFieldID(JniConstants::deflaterClass, "finished", "Z"); in Deflater_deflateImpl()
[all …]
Dlibcore_icu_Transliterator.cpp30 static jlong Transliterator_create(JNIEnv* env, jclass, jstring javaId) { in Transliterator_create() argument
31 ScopedJavaUnicodeString id(env, javaId); in Transliterator_create()
37 if (maybeThrowIcuException(env, "Transliterator::createInstance", status)) { in Transliterator_create()
47 static jobjectArray Transliterator_getAvailableIDs(JNIEnv* env, jclass) { in Transliterator_getAvailableIDs() argument
50 return fromStringEnumeration(env, status, "Transliterator::getAvailableIDs", e); in Transliterator_getAvailableIDs()
53 static jstring Transliterator_transliterate(JNIEnv* env, jclass, jlong peer, jstring javaString) { in Transliterator_transliterate() argument
55 ScopedJavaUnicodeString string(env, javaString); in Transliterator_transliterate()
62 return env->NewString(s.getBuffer(), s.length()); in Transliterator_transliterate()
71 void register_libcore_icu_Transliterator(JNIEnv* env) { in register_libcore_icu_Transliterator() argument
72 jniRegisterNativeMethods(env, "libcore/icu/Transliterator", gMethods, NELEM(gMethods)); in register_libcore_icu_Transliterator()
DJniException.cpp22 void jniThrowExceptionWithErrno(JNIEnv* env, const char* exceptionClassName, int error) { in jniThrowExceptionWithErrno() argument
24 jniThrowException(env, exceptionClassName, jniStrError(error, buf, sizeof(buf))); in jniThrowExceptionWithErrno()
27 void jniThrowOutOfMemoryError(JNIEnv* env, const char* message) { in jniThrowOutOfMemoryError() argument
28 jniThrowException(env, "java/lang/OutOfMemoryError", message); in jniThrowOutOfMemoryError()
31 void jniThrowSocketException(JNIEnv* env, int error) { in jniThrowSocketException() argument
32 jniThrowExceptionWithErrno(env, "java/net/SocketException", error); in jniThrowSocketException()
Dlibcore_icu_NativeNormalizer.cpp26 static jstring NativeNormalizer_normalizeImpl(JNIEnv* env, jclass, jstring s, jint intMode) { in NativeNormalizer_normalizeImpl() argument
27 ScopedJavaUnicodeString src(env, s); in NativeNormalizer_normalizeImpl()
35 maybeThrowIcuException(env, "Normalizer::normalize", status); in NativeNormalizer_normalizeImpl()
36 return dst.isBogus() ? NULL : env->NewString(dst.getBuffer(), dst.length()); in NativeNormalizer_normalizeImpl()
39 static jboolean NativeNormalizer_isNormalizedImpl(JNIEnv* env, jclass, jstring s, jint intMode) { in NativeNormalizer_isNormalizedImpl() argument
40 ScopedJavaUnicodeString src(env, s); in NativeNormalizer_isNormalizedImpl()
47 maybeThrowIcuException(env, "Normalizer::isNormalized", status); in NativeNormalizer_isNormalizedImpl()
55 void register_libcore_icu_NativeNormalizer(JNIEnv* env) { in register_libcore_icu_NativeNormalizer() argument
56 jniRegisterNativeMethods(env, "libcore/icu/NativeNormalizer", gMethods, NELEM(gMethods)); in register_libcore_icu_NativeNormalizer()
Djava_io_File.cpp41 static jstring File_canonicalizePath(JNIEnv* env, jclass, jstring javaPath) { in File_canonicalizePath() argument
42 ScopedUtfChars path(env, javaPath); in File_canonicalizePath()
50 jniThrowIOException(env, errno); in File_canonicalizePath()
53 return env->NewStringUTF(result.c_str()); in File_canonicalizePath()
56 static jboolean File_setLastModifiedImpl(JNIEnv* env, jclass, jstring javaPath, jlong ms) { in File_setLastModifiedImpl() argument
57 ScopedUtfChars path(env, javaPath); in File_setLastModifiedImpl()
123 static bool readDirectory(JNIEnv* env, jstring javaPath, DirEntries& entries) { in readDirectory() argument
124 ScopedUtfChars path(env, javaPath); in readDirectory()
140 static jobjectArray File_listImpl(JNIEnv* env, jclass, jstring javaPath) { in File_listImpl() argument
143 if (!readDirectory(env, javaPath, entries)) { in File_listImpl()
[all …]
Dlibcore_icu_DateIntervalFormat.cpp27 static jlong DateIntervalFormat_createDateIntervalFormat(JNIEnv* env, jclass, jstring javaSkeleton,… in DateIntervalFormat_createDateIntervalFormat() argument
28 ScopedIcuLocale icuLocale(env, javaLocaleName); in DateIntervalFormat_createDateIntervalFormat()
33 ScopedJavaUnicodeString skeletonHolder(env, javaSkeleton); in DateIntervalFormat_createDateIntervalFormat()
40 if (maybeThrowIcuException(env, "DateIntervalFormat::createInstance", status)) { in DateIntervalFormat_createDateIntervalFormat()
44 ScopedJavaUnicodeString tzNameHolder(env, javaTzName); in DateIntervalFormat_createDateIntervalFormat()
57 static jstring DateIntervalFormat_formatDateInterval(JNIEnv* env, jclass, jlong address, jlong from… in DateIntervalFormat_formatDateInterval() argument
65 if (maybeThrowIcuException(env, "DateIntervalFormat::format", status)) { in DateIntervalFormat_formatDateInterval()
69 return env->NewString(s.getBuffer(), s.length()); in DateIntervalFormat_formatDateInterval()
77 void register_libcore_icu_DateIntervalFormat(JNIEnv* env) { in register_libcore_icu_DateIntervalFormat() argument
78 jniRegisterNativeMethods(env, "libcore/icu/DateIntervalFormat", gMethods, NELEM(gMethods)); in register_libcore_icu_DateIntervalFormat()

123