其他分享
首页 > 其他分享> > 视频解码,防止被和xie;

视频解码,防止被和xie;

作者:互联网

FileInputStream fis = null;
FileOutputStream fos = null;
try {
    fis = new FileInputStream("Day11Class/o.mp4");
    fos = new FileOutputStream("Day11Class/x.mp4");
    byte[]arr = new byte[1024*8];
    int len;
    while ((len = fis.read(arr)) != -1) {
        for (int i = 0; i < len; i++) {
            arr[i]^=5;
        }
        fos.write(arr,0,len);
    }
} catch (IOException e) {
    e.printStackTrace();
} finally {
    try {
        if (fis != null)
            fis.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
    try {
        if (fos != null)
            fos.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

标签:视频,arr,xie,fos,解码,len,printStackTrace,fis,null
来源: https://blog.csdn.net/YYds6668/article/details/121070917