Tag Archives: String

How To Convert Byte[] Array To String in Java

In some cases, we have to convert the String variable into a Byte array format, for example, JCE encryption. However, how do we convert a Byte[] array to a String afterward?Simple toString() function like the following code is not a working property. It will not display the original text but the byte value. In order to convert the 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
  • Tencent Binhai Building, Shenzhen, China
  • root [at] haozhexie [dot] com