This is the first time that I use the JNI and also the first time that I have to write some lines in C.
What I am trying to do is very ...
HANDLE hFile = CreateFileA("C:\\myfile.zip", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
const int size = GetFileSize(hFile, NULL);
char* buffer = new char[size];
ReadFile(hFile, buffer, size, &read, NULL);
jclass cls = ...;
jmethodID id = ...;
jbyteArray arr ...
The question is:
Suppose I use the function:
(* env) -> GetByteArrayRegion (env, array, 0, len, (jbyte *)buf);
In this case, a certain number of bytes written from the array to the buf or ...
I have a very large char buffer in C and need to copy some part of it to a Java array.
Specifically, I need the elements starting at 16,384 and ending ...
I know how to create a jobject and would like to convert an existing char ** into a corresponding byte and pass it to the jobject using JNI.
How would I go ...