In this answer, a guy suggested using
InputStream is = new URL(imgUrl).openStream();
OutputStream os = servletResponse.getOutputStream();
As you say, the documentation says nothing about closing the
OutputStream for you, so you need to close it (explicitly, or by using try-with-resources).
The reason Tomasz didn't close the stream in that answer was that it's the output stream of a servlet response. As andih said in a comment, you only close streams you open. The servlet container manages the servlet response stream.