Code example for Inflater

Methods: end, inflate, setInput

0
    public void test_Constructor() { 
        // test method of java.util.zip.inflater.Inflater() 
        Inflater inflate = new Inflater();
        assertNotNull("failed to create the instance of inflater",
                        inflate);
    } 
 
    /** 
     * @tests java.util.zip.Inflater#inflate(byte[], int, int) 
     */ 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "DataFormatException checking missed.", 
        method = "inflate", 
        args = {byte[].class, int.class, int.class} 
    ) 
    public void test_inflate$BII() { 
        // test method of java.util.zip.inflater.inflate(byte,int,int) 
 
        byte byteArray[] = {1, 3, 4, 7, 8, 'e', 'r', 't', 'y', '5'};
        byte outPutInf[] = new byte[100];
        int y = 0;
        Inflater inflate = new Inflater();
        try { 
            while (!(inflate.finished())) {
                if (inflate.needsInput()) {
                    inflate.setInput(outPutBuff1);
                } 
                y += inflate.inflate(outPutInf, y, outPutInf.length - y);
            } 
        } catch (DataFormatException e) {
            fail("Invalid input to be decompressed");
        } 
        for (int i = 0; i < byteArray.length; i++) {
            assertTrue(