Is this what i should display?

package com.codegym.task.task18.task1804;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/*
Rarest bytes
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream file = new FileInputStream(reader.readLine());
HashMap<Integer, Integer> map = new HashMap();
while(file.available()>0){
int t1 = file.read();
if(!map.containsKey(t1)){
map.put(t1,1);
}
else {
int t = map.get(t1);
map.put(t1,t+1);
}
}
file.close();
ArrayList<Integer> test1 = new ArrayList<>();
int t2=0;
for(Map.Entry<Integer, Integer> map2 : map.entrySet()){
t2 = map2.getValue();
test1.add(t2);
}
Collections.sort(test1);
for(int i=0; i < test1.size(); i++) {
System.out.print(test1.get(i) + " ");
}
}
}