不知道这样写对不对!学长指教
import java.io.*;
public class Test7
{
public static void main(String agrs[]) throws IOException
{
copy();
}
//通过字节流缓冲区完成复制
public static void copy() throws IOException
{
BufferedInputStream bufis = new BufferedInputStream(new FileInputStream("G:\\求职信.doc"));
BufferedOutputStream bufos = new BufferedOutputStream(new FileOutputStream("G:\\第二封求职信.doc"));
int by = 0;
while((by=bufis.read())!=-1)
{
bufos.write(by);
}
bufos.close();
bufis.close();
}
} |
|