This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move LoginOption feature from Server to Client
- Loading branch information
1 parent
67d12aa
commit 6e285e5
Showing
6 changed files
with
46 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
null null null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package Account; | ||
|
||
import java.io.FileNotFoundException; | ||
import java.io.FileReader; | ||
import java.io.FileWriter; | ||
import java.io.IOException; | ||
import java.util.Scanner; | ||
|
||
public class LoginOption { | ||
|
||
private String[] option = new String[3];; | ||
|
||
public void set(String opt, String id, String name) throws IOException { | ||
// TODO Auto-generated method stub | ||
FileWriter fw = new FileWriter("loginOption", false); | ||
fw.write(opt+" "+id+" "+name); | ||
fw.close(); | ||
} | ||
|
||
public String[] get() throws FileNotFoundException { | ||
// TODO Auto-generated method stub | ||
Scanner scanner = new Scanner(new FileReader("loginOption")); | ||
|
||
while(scanner.hasNext()) { | ||
option[0] = scanner.next(); // 로그인 옵션 | ||
option[1] = scanner.next(); // id | ||
option[2] = scanner.next(); // names | ||
} | ||
scanner.close(); | ||
return option; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters