Code example for InflaterOutputStream

Methods: close, write

0
     * @tests java.util.zip.InflaterOutputStream#write(int) 
     */ 
    public void test_write_I_Illegal() throws IOException { 
 
        // write after close 
        InflaterOutputStream ios = new InflaterOutputStream(os);
        ios.close();
        try { 
            ios.write(-1);
            fail("Should throw IOException");
        } catch (IOException e) {
            // expected 
        } 
    } 
 
    /** 
     * @tests java.util.zip.InflaterOutputStream#write(byte[],int,int) 
     */ 
    public void test_write_$BII() throws IOException { 
        int length = compressToBytes(testString);