HttpServletResponse response = ...; response.setBufferSize(8192);
HttpServletResponse response = ...; response.setContentLength(content.length()); response.setBufferSize(content.length());Both of these examples set the preferred buffer size for the response. In the first example, a fixed buffer size of 8192 bytes is set. In the second example, the buffer size is set to the size of the content length. Package library: javax.servlet.http.