32 lines
719 B
Java
32 lines
719 B
Java
|
package fr.blankoworld.plateau;
|
||
|
|
||
|
import java.io.*;
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
* @author olivier DOSSMANN
|
||
|
*
|
||
|
*/
|
||
|
/**
|
||
|
* Aide a la recuperation des donnees saisies en console par l'utilisateur
|
||
|
*/
|
||
|
public class AideSaisie {
|
||
|
/**
|
||
|
*
|
||
|
* @param prompt
|
||
|
* @return donnees saisies par l'utilisateur
|
||
|
*/
|
||
|
public String getEntreeUtilisateur(String prompt) {
|
||
|
String inputLine = null;
|
||
|
System.out.print(prompt + " ");
|
||
|
try {
|
||
|
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
|
||
|
inputLine = is.readLine();
|
||
|
if (inputLine.length() == 0 ) return null;
|
||
|
}
|
||
|
catch (IOException e) {
|
||
|
System.out.println("IOException: " + e);
|
||
|
}
|
||
|
return inputLine.toLowerCase();
|
||
|
}
|
||
|
}
|