- BufferedInputStream bi = new BufferedInputStream(new FileInputStream("C://111.jpg"));
-
- PrintWriter bo = new PrintWriter(new BufferedOutputStream(new FileOutputStream("D://12223.jpg")));
-
- // BufferedOutputStream bo = new BufferedOutputStream(new FileOutputStream("D://11222.jpg"));
- int len;
- while((len = bi.read()) != -1)
- {
- bo.write(len);
- bo.flush();
- }
-
- bo.close();
- bi.close();
复制代码 PrintWriter不是什么流都可以接受吗,图片是传过去了,但是打开后是图片错误
直接使用缓存输出流就可以
这是为什么?
|