/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
bis = new BufferedInputStream(new FileInputStream("D:\\黑马程序员_毕向东_Java基础视频教程第01天-10-注释.avi"));
bos = new BufferedOutputStream(new FileOutputStream("D:\\01-10.avi"));
int len = 0;
while((len = bis.read()) != -1){
bos.write(len);
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
throw new RuntimeException("未找到源文件");
} catch (IOException e) {
// TODO Auto-generated catch block
throw new RuntimeException("拷贝文件失败");
}finally{
if(bos != null){
try {
bos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
throw new RuntimeException("文件写入流资源关闭失败");
}
}