文件下载时神秘消失的24字节
代码
public static HttpServletResponse downloadZip(File file, HttpServletResponse response) {
OutputStream toClient = null;
InputStream fis = null;
try {
// 以流的形式下载文件。
fis = new BufferedInputStream(new FileInputStream(file.getPath()));
// 清空response
response.reset();
toClient = new BufferedOutputStream(response.getOutputStream());