Reading binary data

Ty Young youngty1997 at gmail.com
Wed Oct 30 20:06:27 UTC 2019


On 10/30/19 9:56 AM, Maurizio Cimadamore wrote:
>
> 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/


Seems like the build i'm using doesn't have the lower level memory 
access API. I'm using the 2019 JDK build. Are there pre-built JDKs 
available or is compiling from source required?


>
> 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?


Yes, native. Just using foreign Pointer API.


>
> Maurizio
>
>


More information about the panama-dev mailing list