Выдаёт NumberFormatException. Не понимаю почему
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String name = reader.readLine();
ArrayList<Integer> list = new ArrayList<>();
FileInputStream fileReader = new FileInputStream(name);
int input;
while (!((input = fileReader.read()) == 0)) {
list.add(input);
System.out.println(input);
}
}
}