Code example for FilterOutputStream

Methods: closewrite

0
        } 
    } 
 
    public void test_close() throws IOException { 
        Support_OutputStream sos = new Support_OutputStream();
        os = new FilterOutputStream(sos);
        os.close();
 
        try { 
            os.write(42);
        } catch (java.io.IOException e) {
            fail("Test 1: Unexpected IOException.");
        } 
 
        sos.setThrowsException(true);
        try { 
            os.write(42);
            fail("Test 2: IOException expected.");
        } catch (java.io.IOException e) {
            // Expected. 
        } 
 
Connect your IDE to all the code out there  Get Codota for Java