byte[]转换成String

package com.bill.example;
 
public class StringByteArrayExamples 
{
    public static void main(String[] args) 
    {
        //Original String
        String string = "hello world";
         
        //Convert to byte[]
        byte[] bytes = string.getBytes();
         
        //Convert back to String
        String s = new String(bytes);
         
        //Check converted string against original String
        System.out.println("Decoded String : " + s);
    }
}

注:https://www.cnblogs.com/keeplearnning/p/7003415.html