1,准备视频文件
2,代码编程
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
public class ioInOutPutStrean1 {
public static void main(String[] args) throws IOException {
//
FileInputStream fis = new FileInputStream("E:\\qycache\\download\\刑警之海外行动第1集-超清720P.qsv");
FileOutputStream fos = new FileOutputStream("D:\\myio\\刑警之海外行动第1集-超清.qsv");
byte[] bytes = new byte[1024];
int len;//本次读到的有效字节个数
while ((len = fis.read(bytes)) != -1) {
fos.write(bytes, 0, len);
}
fis.close();
fos.close();
}
}
3.目标文件创建完成路径,找到路径即可播放