code: private String renderLogFileContents(String fileName) throws IOException {
          FileBackedStringBuffer buffer = new FileBackedStringBuffer();
          int index = retrieveIndexValueFromFileName(fileName);
          int runningIndex = 0;
          File eachFile = null;
          while ((eachFile = retrieveFileFromLogsFolder(Integer.toString(runningIndex))) != null
                  && (runningIndex <= index)) {
              BufferedReader reader = new BufferedReader(new FileReader(eachFile));
              String line = "";
              buffer.append("<pre>");
              while ((line = reader.readLine()) != null) {
                  buffer.append("<br>").append(line).append("</br>");
              }
              buffer.append("</pre>");
              reader.close();
              runningIndex++;
          }
          return buffer.toString();
      }
docs: This method read the content of the file and append into FileBackedStringBuffer
  
  @param fileName
  Read the content of the log file
  @return a {@link FileBackedStringBuffer} to display in web page
  @throws IOException