|
|
|
@ -0,0 +1,32 @@
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|