struts返回值类型
来源:互联网 发布:网络层的功能 编辑:程序博客网 时间:2024/05/16 10:05
public
InputStream getDocumentInputStrame()
throws
FileNotFoundException{
String downFilePathServletActionContext.getServletContext()
.getRealPath(
"/"
);
//文件路径
downloadFileName=tenderfile.getFilename();
//文件名称
downloadFileName=
this
.getFileEcodingName(downloadFileName);
//调用action的方法传入参数,对文件名称进行编码解码。
StringBuffer sb=
new
StringBuffer();
sb.append(downFilePath).append(downloadFileName);
File file=
new
File(sb.toString());
InputStream in=
new
FileInputStream(file);
return
in;
//返回输入流
}
public
String getFileEcodingName(String downloadFileName) {
try
{
downloadFileName=
new
String(downloadFileName.getBytes(),
"ISO-8859-1"
);
}
catch
(UnsupportedEncodingException e) {
e.printStackTrace();
}
return
downloadFileName;
}
0 0
- struts返回值类型
- Struts常用结果返回类型
- struts的return返回类型。【转载未测试】
- Ajax的工具类AjaxUtils,使用struts返回Json类型
- Struts学习笔记(二)action的返回类型
- struts json 类型异常返回到js弹框
- 函数返回值类型
- 返回值类型
- SpringMVC返回值类型
- SpringMvc 返回值类型
- Ajax返回值类型
- SpringMVC返回值类型
- struts2返回值类型
- Mybatis 返回值类型
- C++基础---有返回值类型函数(返回引用类型)
- getchar()的返回值类型
- C++函数返回值类型
- 注意sizeof 返回值类型
- 移动+免费,网络文学新起点
- Ubuntu下搭建FTP服务器
- 查找List 某一段数据
- C#后台获取前台JS写的Cookie
- HDU 1069 Monkey and Banana (动规)
- struts返回值类型
- uva 201 - Squares(自己的方法,同学有更好一点点的方法)
- merge和include在XML中的灵活应用
- C++中实现控制台中输入的内容保存到文件中
- 【翻译自mos文章】How to Set or Switch Oracle Homes on Windows (Doc ID 969581.1)
- poj 3716 贝叶斯公式的应用
- UVA - 127 ``Accordian'' Patience
- crm操作电子邮件
- SharePoint 2010 WebPart Web部件 总贴