Помогите, вроде все правильно
package com.javarush.task.task18.task1810;
/*
DownloadException
*/
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
public class Solution {
public static void main(String[] args) throws DownloadException, IOException {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream fileInputStream;
int count = 0;
while (true) {
fileInputStream = new FileInputStream(bufferedReader.readLine());
while(fileInputStream.available()>0){
fileInputStream.read();
count++;
}
// count = 0;
if(count<1000) {
bufferedReader.close();
fileInputStream.close();
throw new DownloadException();}
//System.out.println(count);
}
}
public static class DownloadException extends Exception {
}
}