首页 > 其他 > 详细

Activiti导出模型文件xml(xml文件超过10K)

时间:2017-12-07 16:59:15      阅读:574      评论:0      收藏:0      [点我收藏+]

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();

Activiti导出模型文件xml(xml文件超过10K)

原文:http://www.cnblogs.com/zhaoyuq/p/7999665.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!