//利用“BinaryWriter”对byte[]进行保存

来源:互联网 发布:何凯明图像去雾算法 编辑:程序博客网 时间:2024/04/29 03:02

                        //利用“BinaryWriter”对byte[]进行保存

                        string strUrl = System.Web.HttpContext.Current.Server.MapPath(strUpPath + @"/" + FileName + ext);

                        System.IO.FileStream fs = new System.IO.FileStream(strUrl, System.IO.FileMode.Create, System.IO.FileAccess.Write);
                        System.IO.BinaryWriter bw = new System.IO.BinaryWriter(fs);
                        bw.Write(bytes);
                        bw.Flush();
                        fs.Flush();
                        bw.Close();
                        fs.Close();

原创粉丝点击