This class implements a stream which compresses data into the zlib format (RFC 1950).
zlib
The compression level can be specified, as a symbolic value identical to what the Deflater class expects. The default compression level is MEDIUM.
Deflater
MEDIUM
205206207208209210211212213214215
asyncOutputStream = outputStream = async.getOutputStream(outputStream); String acceptEncoding = request.getHeader("Accept-Encoding"); if (acceptEncoding != null && acceptEncoding.contains("deflate")) { response.setHeader("Content-Encoding", "deflate"); outputStream = new DeflaterOutputStream(outputStream); } writer = new OutputStreamWriter(getOutputStream(outputStream), "UTF-8"); scheduleHeartbeat();
207208209210211212213214215216217