import java.io.*;

public class FileAccess {
  
  /**
   * Read each line of a file and display
   * the contents on the screen.
   */
  public static void displayFile(String filename) 
    throws IOException{
    FileReader f = new FileReader(filename);
    BufferedReader br = new BufferedReader(f);
    String temp = br.readLine();
    
    // while the end of file has not been reached
    while(temp != null) {
      System.out.println(temp);
      temp = br.readLine();
    }
    
    f.close();
    br.close();
    
    
  }
  
}
