/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package guiskuska;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.table.AbstractTableModel;

/**
 *
 * @author Pepcox
 */
public class Program extends AbstractTableModel{
    
    private String path = "";
    private File file = null;
    private String regExpr;

    public Program() {
       
        
    }
    
    public void setFilePath(String paPath){
        path = paPath;
    }

    public void ReadandMatch(File paFile) {
        String fileContent = "";
        int nrLine = 0;
        try {
            BufferedReader in = new BufferedReader(new FileReader(paFile));
            String str;
            while ((str = in.readLine()) != null) {
                if (str.matches(regExpr)) {
                    System.out.println("PASS : " + str);
                } else {
                    System.err.println("ERR  : " + str);
                }
            }
            in.close();
        } catch (IOException e) {
        }
    }

    @Override
    public int getRowCount() {
        return 2;
    }

    @Override
    public int getColumnCount() {
        return 2;
    }

    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        return "IGNAC";
    }
    
    
    
}
