I do not understand why it does not work
package fr.codegym.task.task09.task0929;
import java.io.*;
/*
Modifions le code pour qu'il fasse quelque chose d'utile !
*/
public class Solution {
public static void main(String[] args) throws IOException {
try{
BufferedReader lecteur = new BufferedReader(new InputStreamReader(System.in));
String nomFichierSource = lecteur.readLine();
String nomFichierDestination = lecteur.readLine();
InputStream fileInputStream = obtenirInputStream(nomFichierSource);
OutputStream fileOutputStream = obtenirOutputStream(nomFichierDestination);
while (fileInputStream.available() > 0) {
int donnees = fileInputStream.read();
fileOutputStream.write(donnees);
}
fileInputStream.close();
fileOutputStream.close(); }
catch(IOException e){
System.out.println("Le fichier n'existe pas.");}
}
public static InputStream obtenirInputStream(String nomFichier) throws IOException {
return new FileInputStream(nomFichier);
}
public static OutputStream obtenirOutputStream(String nomFichier) throws IOException {
return new FileOutputStream(nomFichier);
}
}