Branch yann #6
2 changed files with 6 additions and 7 deletions
|
|
@ -10,7 +10,6 @@ import java.util.zip.ZipInputStream;
|
||||||
public class DataCsv {
|
public class DataCsv {
|
||||||
|
|
||||||
protected String destination;
|
protected String destination;
|
||||||
private ImportData imp;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructeur par defaut
|
* Constructeur par defaut
|
||||||
|
|
@ -23,13 +22,13 @@ public class DataCsv {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructeur avec deux parametres
|
* Constructeur avec parametre
|
||||||
* @param s repertoire de destination
|
* @param s repertoire de destination
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public DataCsv(String s) throws IOException {
|
public DataCsv(String s) throws IOException {
|
||||||
this.destination = s;
|
this.destination = s;
|
||||||
imp = new ImportData("https://www.fdj.fr/jeux-de-tirage/loto/statistiques", this.destination);
|
ImportData imp = new ImportData("https://www.fdj.fr/jeux-de-tirage/loto/statistiques", this.destination);
|
||||||
|
|
||||||
for (String name : imp.tabNameZip) {
|
for (String name : imp.tabNameZip) {
|
||||||
name = this.destination.concat(name);
|
name = this.destination.concat(name);
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ public class ImportData {
|
||||||
public ArrayList<String> tabNameZip;
|
public ArrayList<String> tabNameZip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Le constructeur de ImportData
|
* Constructeur par defaut
|
||||||
* Initialise l'URL par défaut ainsi que le dossier de destination de téléchargement
|
|
||||||
*/
|
*/
|
||||||
ImportData(){
|
ImportData(){
|
||||||
this.url = "https://www.fdj.fr/jeux-de-tirage/loto/statistiques";
|
this.url = "https://www.fdj.fr/jeux-de-tirage/loto/statistiques";
|
||||||
|
|
@ -23,8 +22,9 @@ public class ImportData {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Le constructeur de ImportData
|
* Constructeur avec parametres
|
||||||
* @param url string contenant l URL dou recuperer les fichiers csv
|
* @param url contient l'URL dou recuperer les fichiers csv
|
||||||
|
* @param des respertoire de destination
|
||||||
*/
|
*/
|
||||||
public ImportData(String url, String des){
|
public ImportData(String url, String des){
|
||||||
this.url=url;
|
this.url=url;
|
||||||
|
|
|
||||||
Reference in a new issue