public static void main(String[] args) throws IOException {
// TODO Auto‐generated method stub
//现有一个输入流 再有一个输出流
//输出入流的路径 写的是需要被复制的文件的路径
FileInputStream is = new FileInputStream("");
//输出流的路径 写的是复制到哪里的路径
FileOutputStream os = new FileOutputStream("");
//包装过滤流
BufferedOutputStream bos = new BufferedOutputStream(os);
BufferedInputStream bis = new BufferedInputStream(is);
//使用增强功能 读一个写一个
while(true){
int read = bis.read();
if(read==‐1){
break;
}
bos.write(read);
}
//释放资源
bos.close();
bis.close();
}