I have a Java application which uses a native method.

Mathias Neuhaus

There are at least two possible ways to solve this:

  1. Write the data to a Java datatype (say a byte [] (byte-array)) and make this the return value of your native method
  2. Call the File's write-method from your native method