Code example for DeflaterOutputStream

0
    @SuppressWarnings("unused") 
	private static Log log = LogFactory.getLog(CompressionTransformer.class); 
     
    // This is the outgoing - compression transformation 
	public OutputStream addFilter(OutputStream out, String path, String mimeType, String encoding) { 
		return new DeflaterOutputStream(out); 
	} 
 
    // This is the incomming  - de-compression transformation 
	public InputStream addFilter(InputStream in, String path, String mimeType, String encoding) { 
		return new InflaterInputStream(in); 
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE