package alx.p42_tekstowe;

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

public class Odczyt1_FileReader_v1 {

    public static void main(String[] args) {
        try(FileReader in = new FileReader("pan-tadeusz.txt")) {
            char[] porcja = new char[100];
            while(true) {
                int ile = in.read(porcja);
                if(ile == -1) break;
                System.out.print("@ ");
                System.out.println(porcja);
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
