import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class Test2 {
public static void main(String[] args) throws IOException {
BufferedInputStream a = new BufferedInputStream(new FileInputStream(
"D:\\试验场\\a.txt"));
BufferedOutputStream b = new BufferedOutputStream(new FileOutputStream(
"D:\\试验场\\大时代\\lkdguf.txt"));
byte [] a1 = new byte[1024];
int a2 = 0 ;
while((a2 = a.read(a1))!=-1){
b.write(a1, 0, a2);
}
FileInputStream c = new FileInputStream("D:\\试验场\\a.txt");
FileOutputStream d = new FileOutputStream("D:\\试验场\\大时代\\lkdguf.txt");
byte[] c1 = new byte[1024];
int c2 = 0;
while ((c2 = c.read(c1)) != -1) {
d.write(c1, 0, c2);
}
c.close();
d.close();
}
}
|
|