//文件复制
public class Copy {
public static void main(String[] args) throws Exception {
InputStream is = new FileInputStream("d:\\c2.jpg");
OutputStream os = new FileOutputStream("d:\\c2-副件.jpg");
byte[] buf = new byte[1024];
int len=0;
while((len=is.read(buf))>0){
os.write(buf, 0, len);
}
is.close();
os.close();
}
}
java文件复制
最新推荐文章于 2024-06-18 06:15:00 发布