JNA mapping for uint8_t and int8_t

What are the correct JNA mappings of types uint8_t and int8_t? Thanks!

+4
source share
1 answer

The only 8-bit integer data type in Java is byte , so you should use it. Unfortunately, it is signed, so uint8_t values โ€‹โ€‹greater than 127 will be considered negative when converting to Java byte . This is not a problem because the stored bits are the same.

+4
source

Source: https://habr.com/ru/post/1440454/


All Articles