was ist mein Denkfehler? offensichtlich löst es ja die exception aus, wenn es unter 1000 was auch immer geht? offensichtlich nicht bytes?
package de.codegym.task.task18.task1810;
/*
DownloadException
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws DownloadException, IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream inStream = new FileInputStream(reader.readLine());
while(true){
if(inStream.available() < 1000){
inStream.close();
throw new DownloadException();
}else{
int data = inStream.read();
}
}
}
public static class DownloadException extends Exception {
}
}