Code example for DeflaterInputStream

Methods: close, reset

0
 
    /** 
     * @tests DeflaterInputStream#reset() 
     */ 
    public void testReset() throws IOException { 
        DeflaterInputStream dis = new DeflaterInputStream(is);
        try { 
            dis.reset();
            fail("should throw IOException");
        } catch (IOException e) {
            // expected 
        } 
        dis.close();
        try { 
            dis.reset();
            fail("should throw IOException");
        } catch (IOException e) {
            // expected 
        } 
    }