Code example for InflaterOutputStream

Methods: close, flush

0
 
    /** 
     * @tests java.util.zip.InflaterOutputStream#flush() 
     */ 
    public void test_flush() throws IOException { 
        InflaterOutputStream ios = new InflaterOutputStream(os);
        ios.close();
        try { 
            ios.flush();
            fail("Should throw IOException");
        } catch (IOException e) {
            // expected 
        } 
         
        ios = new InflaterOutputStream(os);
        ios.flush();
        ios.flush();
    } 
 
    /** 
     * @tests java.util.zip.InflaterOutputStream#finish()