I tried many solution but always the requairments are faild.
Can somone help me and tell me what is going on in this task?
package pl.codegym.task.task18.task1810;
/*
DownloadException
*/
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Solution {
public static void main(String[] args) throws DownloadException, Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fileName;
while (true){
fileName = reader.readLine();
FileInputStream FileIS = new FileInputStream(fileName);
if (FileIS.available()>1000) break;
else {
FileIS.close();
throw new DownloadException();
}
}
reader.close();
throw new DownloadException();
}
public static class DownloadException extends Exception {
}
}