文章詳情頁
java讀取本地png圖片到byte數組?
瀏覽:120日期: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
相關文章:
排行榜
