Have you already looked at this website http://iotdk.intel.com/docs/master/mraa/java/classmraa_1_1_uart.html . This site has the Public Member Functions for the UART class. Have you already considered using the setMode ()? Is this what you need?
We need the byte write and read methods instead of String ones.
In c++ you can use write(byte buffer) instead of writeStr(String). We need those ones, the byte one
That function is not directly implemented in the UART class.
As a workaround, you can try to edit the uart functions for read and write string. You can try to edit these files so that they write and read bytes based on the string functions.
https://github.com/intel-iot-devkit/mraa/blob/master/api/mraa/uart.hpp for the writeStr function
for the mraa_uart_write function.
What GPS Unit? Grove with SIM28 / U-BLOX 6?
Managed to fix it? Let me know if you still need help with it