/**
public void copyReponseFile(OutputStream out, BufferedInputStream bis, BufferedOutputStream bos,
Map<String, String> paths, HttpServletResponse response, Map<String, String> map) throws IOException {
String projectName = map.get("name");
out = response.getOutputStream();
response.reset();
response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(projectName, "UTF-8") + "_" + DateUtil.getNowDate("yyyy-MM-dd") + ".zip");
response.setContentType("application/octet-stream;charset=UTF-8");
bis = new BufferedInputStream(new FileInputStream(paths.get("filePath")));
bos = new BufferedOutputStream(out);
byte[] buff = new byte[1024];
int bytesRead;
while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
bos.write(buff, 0, bytesRead);
}
}
以上处理即可。