Code example for BufferedReader

Methods: close, readLine

0
    log.debug("This is just an example test"); 
    log.debug("I will show you how to do a few simple things..."); 
 
    File exampleFile = this.getTestFile("example.txt");
 
    BufferedReader reader = new BufferedReader(new FileReader(exampleFile));
 
    // we only have one line to read. 
    String exampleText = reader.readLine();
    reader.close();
 
    // you get the point... 
    log.debug("exampleText: " + exampleText);
  } 
 
}