Hello,
Someone can helpThanks
package fr.codegym.task.task18.task1810;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.IOException;
/*
DownloadException
*/
public class Solution {
public static void main(String[] args) throws DownloadException, IOException {
BufferedReader lecteur = new BufferedReader(new InputStreamReader(System.in));
String nameFile = lecteur.readLine();
FileInputStream inputStream = new FileInputStream(nameFile);
byte[] buffer = new byte[2000];
while (inputStream.available() > 0) {
int count = inputStream.read(buffer);
if (count < 1000) {
throw new DownloadException();
}
}
inputStream.close();
}
public static class DownloadException extends Exception {
}
}