package cn.edu.nankai.io;
import java.io.*;
public class Duanlei {
public static void main(String [] args) throws Exception{
FileInputStream file=new FileInputStream("c:\\1.txt");
BufferedInputStream in=new BufferedInputStream(file);
byte buf[]=new byte[8192];
BufferedOutputStream out=new BufferedOutputStream(new FileOutputStream("c:\\3.txt"));
int len=0;
int bytesRead=0;
while((bytesRead = in.read(buf, 0, 8192)) != -1)
{
out.write(buf,0,bytesRead);
System.out.println(bytesRead);
}
in.close();
out.close();
}
}
阅读(961) | 评论(0) | 转发(0) |