java中文写代码 java在哪儿写代码( 三 )


if (null != agent-1 != agent.indexOf("MSIE")) {
String codedfilename = StringUtils.replace(URLEncoder.encode(fileName, "UTF-8"), "+", "%20");
response.setHeader("Content-Disposition", "attachment;filename=" + codedfilename);
} else if (null != agent-1 != agent.indexOf("Mozilla")) {
String codedfilename = MimeUtility.encodeText(fileName, "UTF-8", "B");
response.setHeader("Content-Disposition", "attachment;filename=" + codedfilename);
} else {
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
}
response.setContentLength(bytes.length);
response.getOutputStream().write(bytes);
}
【java中文写代码 java在哪儿写代码】java中文写代码的介绍就聊到这里吧 , 感谢你花时间阅读本站内容,更多关于java在哪儿写代码、java中文写代码的信息别忘了在本站进行查找喔 。

推荐阅读