Ошибка Π² Ρ„Π°ΠΉΠ»Π΅ com/javarush/task/task18/task1803/Solution.java Π² строкС : 25 НС Π½Π°ΠΉΠ΄Π΅Π½ ΠΌΠ΅Ρ‚ΠΎΠ΄ "readAllBytes()" Π² ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎΠΉ "fileInputStream" Π²Ρ‹Π΄Π°Π΅Ρ‚ Ρ‚Π°ΠΊΠΎΠ΅ Π²ΠΎΡ‚ сообщСния ΠΏΡ€ΠΈ ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠ΅ Π½Π° ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΡƒ Π·Π°Π΄Π°Ρ‡ΠΈ Π²ΠΎΡ‚ ΠΊΠΎΠ΄
public class Solution {
    public static void main(String[] args) throws Exception {

        Scanner sc = new Scanner(System.in);
        String file = sc.nextLine();
        FileInputStream fileInputStream = new FileInputStream(file);
        Map<Byte, Integer> savedBytes = new HashMap<>();

        byte[] tmp;

        tmp = fileInputStream.readAllBytes();
        Arrays.sort(tmp);
        int iterator = 1;

        for (int i = 0; i < tmp.length; i++) {
            for (int j = i + 1; j < tmp.length; j++) {
                if (tmp[i] == 0) {
                    i++;
                    continue;
                }
                if (tmp[i] == tmp[j]) {
                    if (j - i == 1) {
                        iterator++;
                        savedBytes.put(tmp[i], iterator++);
                        tmp[j] = 0;
                    } else {
                        savedBytes.put(tmp[i], iterator++);
                        tmp[j] = 0;
                    }
                }
            }
            iterator = 0;
        }

        byte biggest;
        int count;
        int index = 0;

        ArrayList<Byte> keys = new ArrayList<>();
        ArrayList<Integer> counts = new ArrayList<>();
        keys.addAll(savedBytes.keySet());
        counts.addAll(savedBytes.values());

        int max = counts.get(0);
        for (int i = 1; i < counts.size(); i++) {
            if (counts.get(i) > max) {
                max = counts.get(i);
                index = counts.indexOf(max);
            }
        }
        for (int i = 0; i < index; i++) {
            System.out.print(keys.get(index) + " ");
        }
    }
}