Tag Archives: String

How To Convert Byte[] Array To String In Java

In some cases, we have to convert String variable into a Byte array format, for example, JCE encryption. However how do we convert a Byte[] array to String afterward? Simple toString() function like following code is not working property. It will not display the original text but byte value. In order to convert Byte array into String format correctly, we have to explicitly create a String object and assign the Byte array to it. And here's a sample code: Output

Continue Reading
Contact Us
  • Room 614, Zonghe Building, Harbin Institute of Technology
  • cshzxie [at] gmail.com