title: A correct way to convert byte[] in java to unsigned char* in C++, and vice versa?
body: <p>I'm newbie in C++ and JNI, I try to find a correct way to convert byte[] in java to unsigned char* in C++ by using JNI, and vice versa ! (I'm working on android)
  After looking for a solution in google and SO, I haven't found a good details way to convert byte[] in java to C++. Please help me, and provide a solution for a vice versa (unsigned char* in C++ to byte[] in java). Thanks very much</p>
  
  <ul>
  <li><strong>byte[] in java to unsigned char* in C++:</strong></li>
  </ul>
  
  <p><strong>JAVA :</strong>   </p>
  
  <pre><code>private static native void nativeReceiveDataFromServer(byte[] value, int length);
  </code></pre>
  
  <p><strong>JNI:</strong></p>
  
  <pre><code>... (JNIEnv* env, jobject thiz, jbyteArray array, jint array_length)
  {
      ???
  }
  </code></pre>
  
  <p>PS: I modified my question for being a real question for my problem :(</p>