package alx.p42_tekstowe;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Odczyt3_BufferedReader_Files {

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