M
mike7411
If you just want to copy data from a char* in C++ to a byte[] in Java
using JNI, what is the fastest way to do this?
Is this right?
JNIEXPORT void JNICALL Java_copy(JNIEnv *env, jbyteArray jb)
{
const char* = "the data I want to copy";
env->SetByteArrayRegion(jb, 0, strlen(str), (jbyte *)str);
}
using JNI, what is the fastest way to do this?
Is this right?
JNIEXPORT void JNICALL Java_copy(JNIEnv *env, jbyteArray jb)
{
const char* = "the data I want to copy";
env->SetByteArrayRegion(jb, 0, strlen(str), (jbyte *)str);
}