title: No copy when calling SetByteArrayRegion when the starting address is not zero
body: <p>I am trying to copy of a (very large) byte array from a C program to my main Java program in using JNI. </p>
  
  <p>I am  using the following code:</p>
  
  <pre><code>JNIEXPORT void JNICALL Java_connectors_javaConnector_updateMap
  (JNIEnv *env, jobject jo, jbyteArray byteArray)
  {
  nextmapping_map[11]=111;
  int from = 0;
  int size = 20;
    (*env)-&gt;SetByteArrayRegion(env, byteArray, from, size,nextmapping_map);
      printf("Copied chunk: %d -&gt; %d\n", from, to);
  }
  </code></pre>
  
  <p>My point is that the code works correctly only when <code>from == 0</code> : if I go in my main program and I request the value of <code>nextmapping_map</code>, I get 111 as expected.
  However, if <code>from &gt; 0</code> (which is necessary because my array is too large to be copied in one time) then I get a wrong value for <code>nextmapping_map</code>.</p>
  
  <p>This behaviour is quite weird. Am I doing something wrong?</p>