求高手帮忙解释这一段代码的意思,看不懂,public void downLoad(string fileName,string path){Response.BufferOutput = false;Response.Clear();Response.AppendHeader("Content-Disposition","attachment; filename=" + Server.UrlEncode(fileName))

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 20:12:13

求高手帮忙解释这一段代码的意思,看不懂,public void downLoad(string fileName,string path){Response.BufferOutput = false;Response.Clear();Response.AppendHeader("Content-Disposition","attachment; filename=" + Server.UrlEncode(fileName))
求高手帮忙解释这一段代码的意思,看不懂,
public void downLoad(string fileName,string path)
{
Response.BufferOutput = false;
Response.Clear();
Response.AppendHeader("Content-Disposition","attachment; filename=" + Server.UrlEncode(fileName));//防止中文名出现乱码
Response.ContentType = "application/octstream";
Response.CacheControl = "Private";
Stream stm = new FileStream(path,FileMode.Open,FileAccess.Read,FileShare.Read);
Response.AppendHeader("Content-length",stm.Length.ToString());
BinaryReader br = new BinaryReader(stm);
byte[] bytes;
for (Int64 x = 0; x < (br.BaseStream.Length / 4096 + 1); x++)
{
bytes = br.ReadBytes(4096);
Response.BinaryWrite(bytes);
System.Threading.Thread.Sleep(5); //休息一下,防止耗用带宽太多.
}
stm.Close();
}

求高手帮忙解释这一段代码的意思,看不懂,public void downLoad(string fileName,string path){Response.BufferOutput = false;Response.Clear();Response.AppendHeader("Content-Disposition","attachment; filename=" + Server.UrlEncode(fileName))
Response.BufferOutput首先这个东东的意思是:是否要当前页面处理完后才发送到浏览器,这里是false,说明将分多次返回页面处理结果
下面的代码意思:读取一个文件到文件流,并分多次返回到浏览器,每5毫秒一次,完成后关闭文件流

求高手帮忙解释这一段代码的意思,看不懂,public void downLoad(string fileName,string path){Response.BufferOutput = false;Response.Clear();Response.AppendHeader(Content-Disposition,attachment; filename= + Server.UrlEncode(fileName)) 求高手帮忙铭牌看不懂 英语翻译有没有解释VC的代码的中文意思的东西?英文我实在看不懂. 50分请高手帮忙解释下下面这段java代码由于没有学过JAVA,拿到这段代码非常郁闷,看不懂,s 是一个16进制数字“2020661a”代码如下:s=s.toUpperCase(); // 这应该是转大写吧?char[] astore7 = s.toCharArray(); 有高手详细解释一下这段代码的意思吗? 求高手帮忙解释下面每一句程序的意思?详细点,谢谢 FANUC加工中心部份G代码请高手解释,最好附带中文和程序G31 G33 G39 G51 G52 G60 G61 G62 G94 G95麻烦高手解释这些G代码如何使用(代码的意思不用解释拉) 帮我解释下下面这段代码的意思 求flash高手解释这句代码:this._y = this._y-this.speed 求道德经这一段的节奏划分和意思解释, 请高手解释下各行代码的意识 谢谢了 请高手解释下各行代码的意识 求高手帮忙解释下这幅给排水图纸中的标注,里面的&40和后面的数字代表什么意思 c语言帮忙解释一段代码if(strnicmp(FullPathName+strlen(FullPathName)-4,.exe,4))包括参数-4和4的解释 求解释每段代码的含义, 一个“史上巨难”解释的英语句子---------------务必高手帮忙这是一篇英语文章的最后一段.实在看不懂.【The truth of her life was a desire to see beyond the surface for a glimpse(一瞥)of what it is that matters. 一个“史上巨难”解释的英语句子---------------务必高手帮忙这是一篇英语文章的最后一段.实在看不懂.【The truth of her life was a desire to see beyond the surface for a glimpse(一瞥)of what it is that matters. 寂静岭结局什么意思 看不懂 求解释