import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import sun.misc.BASE64Decoder; public String getPicFromStreams() { String str ;//存放二进制的流 BASE64Decoder decoder=new BASE64Decoder(); byte[] bytes; try { bytes = decoder.decodeBuffer(str); File file=new File("E:/MYTESTPIC.jpeg"); FileOutputStream fos=new FileOutputStream(file); fos.write(bytes); fos.flush(); fos.close(); } catch (IOException e) { e.printStackTrace(); } return null; }
java 二进制流转换为图片
原创
©著作权归作者所有:来自51CTO博客作者流苏91的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:我的友情链接
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
第五节 二进制安装docker
二进制安装docker
docker linux 开机自启 -
jquery二进制转图片 js图片转二进制流
一个图像处理项目在产品化过程中必然涉及用户交互,即用户如何将自己的图片放到项目核心的算法中、如何拿到算法处理的结果,本篇内容涉及常规网络传输的手段。同时也包括使用socket在服务器中不同Python程序间交互的方法,尽管这种业务需求并不常见。 一般来讲,图像处理算法会使用OpenCV处理numpy矩阵形
jquery二进制转图片 js图片转二进制流 mfc socket发送图片 mfc 二进制转换成图像 python base64解码