title: Java - Store byte array as String in DB and create byte array using String value
body: <p>I have a byte array with the value <code>[B@6c89db9a</code> I have stored this value in a MySQL db as a string representation - <code>mybyteArray.toString()</code></p>
  
  <p>I would like to retrieve the saved value from the database and create a new byte array using the string value of the original byte array. </p>
  
  <p>I have tried the examples <a href="https://stackoverflow.com/questions/6684665/java-byte-array-to-string-to-byte-array">Java Byte Array to String to Byte Array</a></p>
  
  <p>and <a href="https://stackoverflow.com/questions/9290533/byte-to-string-and-vice-versa">byte to string and vice versa</a></p>
  
  <p>However i am not getting the original byte array value. It is generating a different value. Can anyone please advise?</p>