标签:attach isp rtb get new content xml文件 导出 buffer
Activiti导出超过10K的xml文件时,response 要在获取输出流之前设置header格式
原代码为:
ByteArrayInputStream in = new ByteArrayInputStream(exportBytes);
IOUtils.copy(in, response.getOutputStream());
response.setHeader("Content-Disposition", "attachment; filename="+ filename);
response.flushBuffer();
修改后,代码为:
ByteArrayInputStream in = new ByteArrayInputStream(exportBytes);
response.setHeader("Content-Disposition", "attachment; filename="+ filename);
IOUtils.copy(in, response.getOutputStream());
response.flushBuffer();
标签:attach isp rtb get new content xml文件 导出 buffer
原文地址:http://www.cnblogs.com/zhaoyuq/p/7999665.html