I'm currently stuck trying to convert a Java.Nio.ByteBuffer to an array or a string in a Xamarin Android App.
byte[] outputBytes = new byte[16];
Java.Nio.Buffer outputBuffer = ByteBuffer.Wrap(outputBytes);
//... filling buffer (using tflite model)
byte[] bufferBytes = ???
How can I get the content of the buffer?
Apparently there is a function like buffer.array()
, but it doesn't work here.
So if anyone has an idea how i can make this work or any other way, help would be really appreciated.