This should do an unsigned comparison:
```java
int a = left[i] & 0xFF;
int b = right[i] & 0xFF;
```