有一个index.png位于D:/Users/
现在需要读取这个文件并UTF-8转换为byte[]
请各位大佬帮忙
FileInputStream就可以。既然是图片,怎么会有utf-8
File file = new File("D:/Users/xxx.png");
InputStream input = new FileInputStream(file);
byte[] byt = new byte[input.available()];
input.read(byt);