How to convert a byte array to hex string in Java?



Use Integer.toString(int, redix) where int is byte to be converted and redix is 16 for hexadecimal format.



Advertisements