文章详情页
java读取本地png图片到byte数组?
浏览:205日期:2024-01-01 14:05:50
问题描述
File file = new File(path);FileInputStream fis = new FileInputStream(file);byte[] img_content = new byte[(int) file.length()];fis.read(img_content);fis.close();
图片是存在的读入的内容全是0 是什么情况???
问题解答
回答1:文件损坏 和代码没有关系。。。。
标签:
java
相关文章:
1. javascript - 最近用echarts做统计图时遇到两个问题!!2. 浅谈Vue使用Cascader级联选择器数据回显中的坑3. android - TextInputLayout的空白显示问题4. celery+redis 怎么看redis里面的内容5. android - 优酷的安卓及苹果app还在使用flash技术吗?6. 为什么redis中incr一个“0” 会报错?7. angular.js - angular ng-focus ng-blur 存在问题8. 关于layuiadmin中表格按钮提交问题求解!!!!9. PHP类属性声明?10. html - css布局 table cellspacing
排行榜

网公网安备