javaIO流复制输出图片,看不了图片
public static void main(String[] args) throws IOException {
FileInputStream fis = new FileInputStream("C:\\Users\\YPYT\\Desktop\\指位图.jpg");
FileOutputStream fos = new FileOutputStream("D:\\idea file\\test\\java.jpg",true);
byte[] bys = new byte[1024 * 1000 * 2];
int len ;
while ((len = fis.read()) != -1){
fos.write(bys,0,bys.length);
fos.flush();
}
fos.close();
fis.close();
}
结果显示图片文件格式问题