Reading binary data

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Oct 30 14:56:42 UTC 2019


On 30/10/2019 13:47, Ty Young wrote:
> I've stumbled across a function that returns a pointer to memory which 
> contains data(AKA binary data) and a size for it. I'm assuming(correct 
> me if I'm wrong here) that accessing this data requires use of lower 
> level foreign memory API however the API seems to have changed since 
> the presentation given a few months back. What is the correct way 
> currently for accessing this data?
>
>
>
Hi,
I don't think the API has changed much - here's the javadoc (since then 
we added support for mapped segments and for concurrency, but the bulk 
of the API is the same).

http://cr.openjdk.java.net/~mcimadamore/panama/memaccess_javadoc/

To help you with your use case I'd need first to understand how you are 
going to call that function - is it a native function (I assume)? Are 
you calling such function using the Panama foreign API, or the stuff in 
foreign-abi?

Maurizio




More information about the panama-dev mailing list