Java Panama / Foreign Function & Memory API: Reading byte arrays of unknown length Consider a header file defining this method: