Code example for FileReader

Methods: close

0
            // avoid endless loop 
            executeTarget("run-junit"); 
            File f = getProject().resolveFile(REPORT);
            FileReader reader = null;
            try { 
                reader = new FileReader(f);
                String content = FileUtils.readFully(reader);
                assertTrue(content.indexOf("</RESPONSE>&#x5d;&#x5d;&gt;"
                                           + "</ERROR>") > 0); 
            } finally { 
                if (reader != null) {
                    reader.close();
                } 
                f.delete();
            } 
        } 
    } 
 
}