12345678910111213141516171819 |
- import java.io.*;
- import java.util.*;
- import java.text.*;
-
- public class HipsterIpsumReader
- {
- TextIO textIO = new TextIO();
- String fileName = "HipsterIpsum.txt";
- public void readFile() throws IOException {
- BufferedReader br = textIO.open(fileName);
- boolean endOfFile = false;
- while (!endOfFile){
- String fileContents = br.readLine();
- System.out.println(fileContents);
- if(br.readLine()==null)endOfFile=true;
- }
- }
- }
|