You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import java.io.*;
public class test01 {
public static void main(String[] args) {
int str;
FileInputStream fr;
FileOutputStream fw;
BufferedInputStream br=null;
BufferedOutputStream bw=null;
try {
fr = new FileInputStream("D:\\Java库\\source\\有的人一直在长大有的人却不会变老了output.mp4");
fw = new FileOutputStream("D:\\Java库\\target\\有的人一直在长大有的人却不会变老了output.mp4");
br=new BufferedInputStream(fr);
bw=new BufferedOutputStream(fw);
while((str=br.read())!=-1){
bw.write(str);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
bw.flush();
br.close();
bw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}