title: Convert byte array to understandable String
body: <p>I have a program that handles byte arrays in Java, and now I would like to write this into a XML file. However, I am unsure as to how I can convert the following byte array into a sensible String to write to a file. Assuming that it was Unicode characters I attempted the following code:</p>
  
  <pre><code>String temp = new String(encodedBytes, "UTF-8");
  </code></pre>
  
  <p>Only to have the debugger show that the encodedBytes contain <code>"\ufffd\ufffd ^\ufffd\ufffd-m\ufffd\ufffd\/ufffd \ufffd\ufffdIA\ufffd\ufffd"</code>. The String should contain a hash in alphanumerical format.</p>
  
  <p>How would I turn the above String into a sensible String for output?</p>