помогите
package com.javarush.task.task18.task1804;
import java.io.*;
import java.util.*;
/*
Самые редкие байты
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String file = reader.readLine();
FileInputStream stream = new FileInputStream(file);
byte[] date = new byte[stream.available()];
HashMap<Byte, Integer> map = new HashMap<Byte, Integer>();
if(stream.available() > 0) {
stream.read(date);
}
for(int i = 0; i < date.length; i++) {
int count = 0;
for(int j = date.length - 1; j > i; j--) {
if (date[i] == (date[j])) {
count++;
date[j] = 0;
}
}
if (count > 0) {
map.put(date[i], count);
}
}
int b = 0;
for(HashMap.Entry<Byte, Integer> item : map.entrySet()) {
for(HashMap.Entry<Byte, Integer> dva : map.entrySet()) {
if (item.getValue() > dva.getValue()) {
b = dva.getValue();
}
}
}
for(HashMap.Entry<Byte, Integer> item : map.entrySet()) {
if (b == item.getValue()) {
System.out.print(item.getKey() + " ");
}
}
stream.close();
}
}