|
| static std::vector< std::string > | fetch (JNIEnv *env, jobjectArray arr) |
| |
Definition at line 232 of file tl_jni_object.h.
◆ fetch()
| static std::vector< std::string > td::jni::FetchVector< jbyteArray >::fetch |
( |
JNIEnv * |
env, |
|
|
jobjectArray |
arr |
|
) |
| |
|
inlinestatic |
Definition at line 233 of file tl_jni_object.h.
233 {
234 std::vector<std::string> result;
235 if (arr != nullptr) {
236 jsize length = env->GetArrayLength(arr);
237 result.reserve(length);
238 for (jsize i = 0; i < length; i++) {
239 jbyteArray
bytes = (jbyteArray)env->GetObjectArrayElement(arr, i);
240 result.push_back(from_bytes(env, bytes));
241 if (bytes) {
242 env->DeleteLocalRef(bytes);
243 }
244 }
245 env->DeleteLocalRef(arr);
246 }
247 return result;
248 }
The documentation for this struct was generated from the following file: