无法理解从服务器uning jsp下载文件的代码

时间:2017-07-29 10:58:05

标签: jsp

<%
String filename="admin.jsp";
String filepath="c:\\";
respose.setContentType("APPLICATION/OCTET-STREAM");
response.setHeader("Content-Disposition","attachment; filenmae=\""+filename+"\"");
java.io.FileInputStream fileInputStream=new java.io.FileInputStream(filepath+filename);
int i;
while((i=fileInputStream.read())!=-1)
{
out.write(i);
}
fileInputStream.close();
%>

这是代码,但我无法理解“APPLICATION / OCTET-STREAM”和“Content-Disposition”,“attachment; filenmae = \”“+ filename +”\“”

的含义

0 个答案:

没有答案