나는 주제 다음 읽고 : Should one call .close() on HttpServletResponse.getOutputStream()/.getWriter()?response.getOutputStream()을 통해 ZipOutputStream을 명시 적으로 닫아야합니까?
하지만 제가 건축 다음 사용하는 경우 :
ZipOutputStream zos = new ZipOutputStream(response.getOutputStream());
나는 그것을 닫아야 또는 컨테이너가 나 대신 그것을 할 것인가?
'ZipOutputStream.close()'의 javadoc에는 "ZIP 출력 스트림과 필터링되는 스트림을 닫습니다."라는 메시지가 표시됩니다. . – Berger
@Berger, 예, 종료됩니다. 하지만 컨테이너는 response.getOutputStream()을 닫을 것입니다. ans는 닫히지 않습니다. ZipOutputStream – gstackoverflow