Code example for InflaterOutputStream

Methods: write

0
            fail("Should throw IOException");
        } catch (IOException e) {
            // expected 
        } 
 
        ios = new InflaterOutputStream(os);
        try { 
            ios.write(null, 0, 4);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
        try { 
            ios.write(null, -1, 4);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
        try { 
            ios.write(null, 0, -4);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
        try { 
            ios.write(null, 0, 1000);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
        try { 
            ios.write(bytes, -1, 4);
            fail("Should throw IndexOutOfBoundsException");
        } catch (IndexOutOfBoundsException e) {
            // expected 
        } 
        try { 
            ios.write(bytes, 0, -4);
            fail("Should throw IndexOutOfBoundsException");
        } catch (IndexOutOfBoundsException e) {
            // expected 
        } 
        try { 
            ios.write(bytes, 0, 100);
            fail("Should throw IndexOutOfBoundsException");
        } catch (IndexOutOfBoundsException e) {
            // expected 
        } 
        try { 
            ios.write(bytes, -100, 100);
            fail("Should throw IndexOutOfBoundsException");
        } catch (IndexOutOfBoundsException e) {
            // expected 
        }