将经过加密的二进制数据保存到本地的方法
byte[] src = new byte[] { 122,-69, -17, 92, -76, 52, -21, -87, -10, 105, 76, -75, 98, 38, -78, -120, -119, -55, -113, 72, 40, -118, -85, -98, 84, -87 }; //定义一个BASE64Encoder BASE64Encoder encode = new BASE64Encoder(); //将byte[]转换为base64 String base64 = encode.encode(src); System.err.println(base64); //新建一个BASE64Decoder BASE64Decoder decode = new BASE64Decoder(); //将base64转换为byte[] byte[] b = decode.decodeBuffer(base64); System.err.println(Arrays.toString(b)); System.err.println(Arrays.toString(src)); String srcString=Arrays.toString(src); System.err.println(srcString);