C#定位文件位置并修改字节数据

http://blog.sina.com.cn/s/blog_94a1fe540102ympb.html

using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks;   namespace fixMp4 {     class Program     {        static void Main(string[] args)        {           Console.WriteLine("hello world!");            string mp4file = "D:\\fixTool\\cannotPlayCs.mp4";            FileStream writeStream = File.OpenWrite(mp4file);            byte[] newData = new byte[4];            newData[0] = 0x00;            newData[1] = 0x50;            newData[2] = 0x00;            newData[3] = 0x08;           writeStream.Seek(32, SeekOrigin.Begin);           writeStream.Write(newData, 0, newData.Length);           writeStream.Close();        }     } }  
上一篇:Spring 实现策略模式--自定义注解方式解耦if...else


下一篇:汉枫Wi-Fi串口服务器HF2211S应用配置