public static void ExportInFile(String address, String fileName) {

        try (BufferedWriter bw = new BufferedWriter(new FileWriter(address + fileName))) { // Essai d'ouvrir le fichier et de créer un pointeur.

            switch (fileName) {
                case "ObjectsLeague.txt":
                    for (Iterator<String> itLeague = listLeague.keySet().iterator(); itLeague.hasNext();) {
                        String keyListLeague = itLeague.next();
                        League currentLeague = listLeague.get(keyListLeague);
                        String lineToWrite = currentLeague.getName();
                        for (Iterator<String> itListTeams = currentLeague.getListTeams().keySet().iterator(); itListTeams.hasNext();) {
                            String keyListTeams = itListTeams.next();
                            lineToWrite += ";" + keyListTeams;
                        }
                        lineToWrite += "\r\n";
                        bw.write(lineToWrite);
                    }
                    bw.flush();
                    bw.close();
                    break;
                case "ObjectsTeam.txt":
                    for (Iterator<String> itListTeam = listTeam.keySet().iterator(); itListTeam.hasNext();) {
                        String keyListTeam = itListTeam.next();
                        Team currentTeam = listTeam.get(keyListTeam);
                        String lineToWrite = currentTeam.getName() + ";" + currentTeam.getCode() + ";"
                                + currentTeam.getPoints() + ";" + currentTeam.getMatchPlayed() + ";"
                                + currentTeam.getGoalScored() + ";" + currentTeam.getConceded() + ";"
                                + currentTeam.getDifference() + "\r\n";
                        bw.write(lineToWrite);
                    }
                    bw.flush();
                    bw.close();
                    break;
                case "ObjectsMatch.txt":
                    for (Iterator<String> itListMatch = listMatch.keySet().iterator(); itListMatch.hasNext();) {
                        String keyListMatch = itListMatch.next();
                        Match currentMatch = listMatch.get(keyListMatch);
                        String lineToWrite = currentMatch.getHomeTeam() + ";" + currentMatch.getAwayTeam() + ";"
                                + currentMatch.getHomeScore() + ";" + currentMatch.getAwayScore() + ";"
                                + currentMatch.getDay() + "\r\n";
                        bw.write(lineToWrite);
                    }
                    bw.flush();
                    bw.close();
                    break;
            }
        } catch (IOException | NumberFormatException e) { // En cas d'échec au sein de l'éxécution de la clause try.
            System.out.println(e.toString());
        }

    }