I'm trying to convert a
Java byte to a 2-digit Hex
string hex string. I can use the System output to get what I want, but I'm having trouble writing a general method.
In short, I'm looking for the equivalent of doing the following:
..but with the ability to append the results to a StringBuilder/StringBuffer object. Any suggestions? I searched online a bit but the examples I came across included manually converting byte values which seemed a bit excessive. I'm assuming there's something in the API to simplify this in a one-line call.