Code example for PushbackReader

Methods: close

0
     * java.io.PushbackReader#close() 
     */ 
    public void test_close() throws IOException { 
        PushbackReader tobj;
 
        tobj = new PushbackReader(underlying);
        tobj.close();
        tobj.close();
        tobj = new PushbackReader(underlying);
        underlying.throwExceptionOnNextUse = true;
        try { 
            tobj.close();
            fail("IOException not thrown.");
        } catch (IOException e) {
            // expected 
        } 
    } 
 
    /** 
     * java.io.PushbackReader#markSupported() 
     */