public
InputStream getDocumentInputStrame()
throws
FileNotFoundException{
String downFilePathServletActionContext.getServletContext()
.getRealPath(
"/"
);
downloadFileName=tenderfile.getFilename();
downloadFileName=
this
.getFileEcodingName(downloadFileName);
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;
}
不是说action只能返回string或者null吗?为什么上面的代码就可以编译运行啊,求指教。