Code example for Inflater

Methods: end, reset, setInput

0
	public void test_end() { 
		// test method of java.util.zip.inflater.end() 
		byte byteArray[] = { 5, 2, 3, 7, 8 };
 
		int r = 0;
		Inflater inflate = new Inflater();
		inflate.setInput(byteArray);
		inflate.end();
		try { 
			inflate.reset();
			inflate.setInput(byteArray);
		} catch (NullPointerException e) {
			r = 1;
		} 
		assertEquals("inflate can still be used after end is called", 1, r);
 
		Inflater i = new Inflater();
		i.end();
		// check for exception 
		i.end();
	}