Code example for EOFException

0
        public void close() throws IOException { 
            throw new IOException();
        } 
 
        public int read(CharBuffer cb) throws IOException {
            throw new EOFException();
        } 
 
    } 
 
    /** 
     * @tests java.util.Scanner#Scanner(File) 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "Scanner", 
        args = {java.io.File.class}
    ) 
    public void test_ConstructorLjava_io_File() throws IOException { 
        File tmpFile = File.createTempFile("TestFileForScanner", ".tmp");