title: String array to Hex Array (Java)
body: <p>I have a String array that actually consists of Hex characters. </p>
  
  <p>Let's say the contents are -></p>
  
  <pre><code>String array[] = {8C,D9,26,1D,69,B7,96,DB};  
  </code></pre>
  
  <p>Now I want these to be interpreted as Hex characters of 1 byte each and not as a String where each entry is 2 bytes.</p>
  
  <pre><code>StringBuilder output = new StringBuilder();
  for (int j = 0; j &lt; array.length; j++) {
          String temp = "\u00"+ array[j];
          output.append(temp);
      }
  </code></pre>
  
  <p>Tried something like that, but it's not possible because it keeps complaining about "illegal unicode escape". I tried using "\u00" (i.e. two backslashes before u, but stackoverflow displays only one there) instead of "\u00" to get around that error, but then I don't see the real Hex values in the array, instead I see a bunch of strings like -> "\U008C" , "\U00D9" and so on..</p>
  
  <p>I want the after conversion values to be 0x8C, 0xD9, 0x26...</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: I have updated the question, just to clarify there were no commas in the array itself. And eventually I need to put all those values together, and use that as a HMAC key that is a hex string and NOT a text string.</p>