| | |
| | | * @param list 图片数组 |
| | | * @param response 响应 |
| | | */ |
| | | public static void downloadToZip(List<String> list, HttpServletResponse response) |
| | | public static void downloadToZip(List<String> list, List<String> names, HttpServletResponse response) |
| | | { |
| | | int i = 0; |
| | | //如果有附件 进行zip处理 |
| | |
| | | InputStream ins = Files.newInputStream(Paths.get(localPath + s)); |
| | | //塞入流数组中 |
| | | srcFiles[i] = ins; |
| | | srcFileNames[i] = path.substring(path.lastIndexOf("/",path.lastIndexOf("-"))); |
| | | srcFileNames[i] = names.get(list.indexOf(path))+".png"; |
| | | i++; |
| | | } |
| | | response.setCharacterEncoding("UTF-8"); |