public void exportResult() throws Exception {
try {
OutputStream out = response.getOutputStream();
InputStream stream = getClass().getClassLoader()
.getResourceAsStream("static/templet/importPhoto.zip");
File targetFile = new File("批量导入模板.zip");
FileUtils.copyInputStreamToFile(stream, targetFile);
String zipname = "压缩包.zip";
response.setCharacterEncoding("UTF-8");
response.setContentType("application/octet-stream; charset=UTF-8");
response.addHeader("Content-Disposition",
"attachment; filename=\"" + new String(zipname.getBytes("GB2312"), "ISO8859-1") + "\";");
response.getOutputStream().write(FileUtils.readFileToByteArray(targetFile));
} catch (Exception e) {
e.printStackTrace();
}
}