Code example for DeflaterInputStream

Methods: close, markSupported

0
 
    /** 
     * @tests DeflaterInputStream#markSupported() 
     */ 
    public void testMarkSupported() throws IOException { 
        DeflaterInputStream dis = new DeflaterInputStream(is);
        assertFalse(dis.markSupported());
        dis.close();
        assertFalse(dis.markSupported());
    } 
 
    /** 
     * @tests DeflaterInputStream#read() 
     */ 
    public void testRead() throws IOException { 
        DeflaterInputStream dis = new DeflaterInputStream(is);
        assertEquals(1, dis.available());
        assertEquals(120, dis.read());
        assertEquals(1, dis.available());
        assertEquals(156, dis.read());
        assertEquals(1, dis.available());