字符串和字节数组之间互相转换失败

java中对String.getBytes()得到的字节数组处理,处理完转换为String,再通过String.getBytes()得到的字节数组和原字节数组不同,再次对字节数组做相反的处理得到的字符串乱码

package com.cjs.file.test;

import java.io.UnsupportedEncodingException;

public class Test {

public static void main(String[] args) throws UnsupportedEncodingException {

    String fileContent = "今天是神十一飞行乘组在组合体的第一天";

    byte[] fileContentByte1 = fileContent.getBytes();

System.out.println("fileContentByte1 length : " + fileContentByte1.length); //fileContentByte1 length : 54

    for (int i=0; i<fileContentByte1.length; ++i) {
        fileContentByte1[i] -= 10;
    }   
    String fileContentBak = new String(fileContentByte1, "UTF-8");
    byte[] fileContentByte2 = fileContentBak.getBytes("UTF-8");

System.out.println("fileContentByte2 length : " + fileContentByte2.length); //fileContentByte2 length : 76

    for (int i=0; i<fileContentByte2.length; ++i) {
        fileContentByte2[i] += 10;
    }
    String result = new String(fileContentByte2, "UTF-8");

System.out.println(result); //����������������十一������������组����组合����的����一����
}

}


图片说明