Thanks Gaëtan for answering.
Then there is no available java api for using UART and GPIO pins interrupt. Is this right?
I have done UART read and write stream but it is using the for ever loop for reading stream that will be problem with battery base devices.
Also i have done GPIO project input and output (digital or analog)
But the same thing from UART reading mode is true for GPIO input.
If we dont use interrupt we have to make some for ever loop to read pins or input stream that will consume battery and will be problem with battery base devices then i have to use interrupt.
In your examples in github you are using a for ever loop .