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();
}
} 作者: gzp123 时间: 2015-5-18 23:54
哈哈哈,不错不错