package alx.p42_tekstowe;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Odczyt2_BufferedReader {

    public static void main(String[] args) {
        try(FileReader in = new FileReader("pan-tadeusz.txt");
            BufferedReader br = new BufferedReader(in)) {
            String linia;
            while((linia = br.readLine()) != null) {
                System.out.println("[" + linia + "]");
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
