could someone explain me what's wrong ??
package fr.codegym.task.task18.task1809;
/*
Inversion d'un fichier
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String S = reader.readLine();
String A = reader.readLine();
FileOutputStream fileOutputStream = new FileOutputStream(A);
FileInputStream fileInputStream = new FileInputStream(S);
while (fileInputStream.available() > 0) {
byte[] bytes = new byte[fileInputStream.available()];
for (int i = 0; i < fileInputStream.available(); i++) {
bytes[i] = (byte) fileInputStream.read();
}
// fermeture des flux //
for(int i=0; i < fileInputStream.available(); i++){
fileOutputStream.write(bytes[fileInputStream.available()-1-i]);
}
}
fileInputStream.close();
fileOutputStream.close();
}
}