Code example for PushbackInputStream

Methods: close

0
    } 
 
    public void test_close() throws IOException { 
        PushbackInputStream tobj;
 
        tobj = new PushbackInputStream(underlying);
        tobj.close();
        tobj.close();
        tobj = new PushbackInputStream(underlying);
        underlying.throwExceptionOnNextUse = true;
        try { 
            tobj.close();
            fail("IOException not thrown.");
        } catch (IOException e) {
            // expected 
        } 
    } 
 
    public void test_available() throws IOException { 
        PushbackInputStream tobj;