给你改了代码:
- import java.io.*;
- class TEST
- {
- public static void main(String[] agrs) throws IOException
- {
- //获取键盘输入对象
- FileInputStream fin =new FileInputStream("C:\\bar.emf");
-
- FileOutputStream fout = new FileOutputStream("C:\\1.jpg");
- byte[] tmp=new byte[1024];
- int len=0;
- while((len=fin.read(tmp))!=-1)
- {
- //if("over".equals(line))
- // break;
- fout.write(tmp,0,len);
- //bufw.newLine();//换行
- fout.flush();
- }
- fout.close();
-
- }
- }
复制代码
|