title: How to display hexadecimals in a readable way in java
body: <p>I have a device sending me their IP address in hexadecimal form through a udp packet.
  I want to print out that IP address in the form that it came in. FF FF FF FF for example.</p>
  <p>But I'm not sure how to do that, and my code won't work because it just turns everything into the unreadable UTF-8 symbol.</p>
  <pre><code>byte[] ipAddr = {(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF};
  String ipString = new String(ipAddr, StandardCharsets.UTF_8);
  </code></pre>
  <p>How can I change the code so that printing ipString gives &quot;FF FF FF FF&quot;?</p>