Given an arbitrary byteArray I need to check if a digit is greater than 9, if so the method returns false. I came to this solution, but I think it's a better way of doind that (maybe with some unary operations or other tricks):
for (int i : byteArray)
if (i/16 > 0x09 || i%16 > 0x09) return false;
I tried to convert the number to a string, but it was slower.