FileInputStream in
= new FileInputStream("MyTest2.java");
File file
= new File("C:\\Users\\Administrator\\Desktop\\test1");
file
.mkdirs();
FileOutputStream out
= new FileOutputStream(new File(file
,"MyTest2.java"));
int len
=0;
while ((len
=in
.read())!=-1){
out
.write(len
);
out
.flush();
}
in
.close();
out
.close();
转载请注明原文地址: https://mac.8miu.com/read-495607.html