protected OutputStream wrapOutputStream(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
throws IOException
{
ServletOutputStream os = httpServletResponse.getOutputStream();
if(canCompress(httpServletRequest))
os = new CompressionOutputStreamWrapper(httpServletResponse,
endpointConfiguration.getResponseCompressionThreshold());
else
os = new NoCloseServletOutputStreamWrapper(os);
return new SizeTrackingOutputStream(os, false);