fix(测试跟踪): 修改文件流关闭
This commit is contained in:
parent
a13c3b2de3
commit
5374525783
|
@ -331,9 +331,8 @@ public class TestCaseService {
|
|||
public void download(HttpServletResponse res) throws IOException {
|
||||
// 发送给客户端的数据
|
||||
byte[] buff = new byte[1024];
|
||||
InputStream is = TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/testcase.xml");
|
||||
try (OutputStream outputStream = res.getOutputStream();
|
||||
BufferedInputStream bis = new BufferedInputStream(is);) {
|
||||
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/testcase.xml"));) {
|
||||
int i = bis.read(buff);
|
||||
while (i != -1) {
|
||||
outputStream.write(buff, 0, buff.length);
|
||||
|
|
Loading…
Reference in New Issue