Code example for Deflater

Methods: end

0
		return data;
	} 
	 
	private boolean deflateImageData(ByteArrayOutputStream baos, byte[] data) {
		if (data != null) {
			Deflater deflater = new Deflater(COMPRESSION_LEVEL);
			DeflaterOutputStream dos = new DeflaterOutputStream(baos, deflater);
			try { 
				dos.write(data);
				dos.close();
				deflater.end();
				return true; 
			} catch (IOException e) {
				e.printStackTrace();
			} 
		} 
		return false; 
	} 
 
	private String encodeImageData(ByteArrayOutputStream baos) {
Contextual code suggestions in your IDE  Get Codota for Java