package com.filingweb;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import com.sun.imageio.spi.OutputStreamImageOutputStreamSpi;
import sun.misc.BASE64Decoder;
public class text22 {
public static void main(String[] args) throws IOException {
//加密的BASE64字符串
String newmsg="**********";
byte[] b=null;
BASE64Decoder base=new BASE64Decoder();
//解密
b=base.decodeBuffer(newmsg);
//处理数据
for(int i=0;i<b.length;i++){
if(b[i]<0){
b[i] +=256;
}
}
//目标图片
OutputStream out=new FileOutputStream("C:\\Users\\Administrator\\Desktop\\aa\\a.jpg");
out.write(b);
out.flush();
out.close();
}
}
字符串转成图片
最新推荐文章于 2023-04-25 11:44:36 发布