diff --git a/src/main/java/de/softwerkskammer/bankocr/AccountNumbersParser.java b/src/main/java/de/softwerkskammer/bankocr/AccountNumbersParser.java index 183b961..48e54a0 100644 --- a/src/main/java/de/softwerkskammer/bankocr/AccountNumbersParser.java +++ b/src/main/java/de/softwerkskammer/bankocr/AccountNumbersParser.java @@ -20,9 +20,11 @@ public static List getAccountNumbers(File accountNumbersFile) throws IOE List content = Files.readAllLines(accountNumbersFile.toPath()); for (int lineIndex = 0; lineIndex < content.size(); lineIndex += NUMBER_OF_DIGIT_ROWS + 1) { + char[][] accountEntry = new char[NUMBER_OF_DIGIT_ROWS][NUMBER_OF_DIGIT_COLS]; - for (int rowIndex = 0; rowIndex < NUMBER_OF_DIGIT_ROWS; rowIndex++) - accountEntry[rowIndex] = content.get(rowIndex).toCharArray(); + accountEntry[0] = content.get(lineIndex).toCharArray(); + accountEntry[1] = content.get(lineIndex + 1).toCharArray(); + accountEntry[2] = content.get(lineIndex + 2).toCharArray(); accountNumbers.add(parseAccountNumber(accountEntry)); }