Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void commandMenu() {
- while (true) {
- System.out.println(STOR);
- System.out.println(RETR);
- System.out.println(LIST);
- System.out.println(DISCONNECT);
- System.out.print("Digite o comando : ");
- String choice;
- try {
- choice = bufferedReader.readLine();
- switch (choice) {
- case STOR:
- commandSTOR();
- break;
- case RETR:
- commandRETR();
- break;
- case LIST:
- commandLIST();
- break;
- case DISCONNECT:
- commandDISCONNECT();
- break;
- case DELE:
- commandDELETE();
- default:
- System.out.println("Comando não reconhecido!");
- }
- } catch (IOException iOException) {
- System.err.println("Opção inválida! Tente outra vez.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement