Completed reading in the CSV #1

Merged
AustrianToast merged 12 commits from Feature/import_csv into dev 2023-03-17 15:31:57 +01:00
Showing only changes of commit 8b3a283118 - Show all commits

View File

@ -9,22 +9,19 @@ public class Matrix {
} }
public String[] importCSV(String file) { public String[] importCSV(String file) {
String[] result = null; String[] result = new String[100];
String line;
try { try {
BufferedReader br = new BufferedReader(new FileReader(file)); BufferedReader br = new BufferedReader(new FileReader(file));
line = br.readLine(); while (br.readLine() != null) {
result = br.readLine().trim().split(";");
while (line != null) {
result = line.trim().split(";");
} }
br.close(); br.close();
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
e.getStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {
e.getStackTrace(); e.printStackTrace();
} }
return result; return result;
} }