Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited


Community Reputation

0 Neutral

About cgabes

  • Rank
  • Birthday 01/01/1
  1. cgabes

    Byte array as input

    I found my solution. For anyone wanting to know... here is how the conversion is done... char[] charArr = new char[image.length]; for (int i = 0; i < charArr.length; i++) { charArr = (char)(image & 0xFF); } args[2] = Pointer.create("char*", charArr);
  2. cgabes

    Byte array as input

    I saw the question about byte arrays as arguments. The posted solution was for byte array as an output. I have the other side of this problem. How do I pass in a byte array to a C function? When I convert to a char array, the unprintable characters (outside of the standard ascii type) get lost and my resulting array is garbage. Can I create an integer array using the int value of the byte and pass that? Thanks in advance for the help.