import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.StringTokenizer; public class ImportFile { String data; String datas; String ligne; public ImportFile(String path) throws FileNotFoundException { //FileInputStream fis = new FileInputStream(datas); try { BufferedReader br = new BufferedReader(new FileReader(path)); ligne=br.readLine(); StringTokenizer st=new StringTokenizer(ligne, ";"); while ((ligne = br.readLine()) != null) { while(st.hasMoreTokens()) System.out.println(st.nextToken()); } System.out.println(st.countTokens()); br.close(); } catch (Exception e){ e.printStackTrace(); } } public static void main(String args[]) throws FileNotFoundException{ ImportFile impor = new ImportFile("/home/ismael/Bureau/leroy/cohortes.csv"); } }