mirror of
https://gitlab.com/arnekeller/kit-programmieren-ws1920-final2.git
synced 2024-11-27 18:55:54 +00:00
Update terminal file
This commit is contained in:
parent
477b45c42b
commit
2ab56c21ee
@ -24,11 +24,7 @@ public final class Terminal {
|
||||
* of characters, arrays, and lines. This stream is already open and ready to supply input data and corresponds
|
||||
* to keyboard input.
|
||||
*/
|
||||
private static BufferedReader IN = new BufferedReader(new InputStreamReader(System.in));
|
||||
|
||||
public static void reload() {
|
||||
IN = new BufferedReader(new InputStreamReader(System.in));
|
||||
}
|
||||
private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
|
||||
|
||||
/**
|
||||
* Private constructor to avoid object generation.
|
||||
@ -68,6 +64,13 @@ public final class Terminal {
|
||||
System.out.println(object);
|
||||
}
|
||||
|
||||
/**
|
||||
* xx.
|
||||
*/
|
||||
public static void reload() {
|
||||
in = new BufferedReader(new InputStreamReader(System.in));
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints an array of characters and then terminate the line.
|
||||
*
|
||||
@ -97,9 +100,9 @@ public final class Terminal {
|
||||
*/
|
||||
public static String readLine() {
|
||||
try {
|
||||
String line = IN.readLine();
|
||||
String line = in.readLine();
|
||||
while (line != null && line.startsWith("#")) {
|
||||
line = IN.readLine();
|
||||
line = in.readLine();
|
||||
}
|
||||
if (line == null) {
|
||||
return "quit";
|
||||
|
Loading…
Reference in New Issue
Block a user