|
|
@ -7,24 +7,29 @@ import java.util.Scanner; |
|
|
|
public class PasswordManager implements PasswordManagerInterface { |
|
|
|
|
|
|
|
boolean running = true; |
|
|
|
InputStream inputStream = System.in; |
|
|
|
OutputStream outputStream = System.out; |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
PasswordManager pm = new PasswordManager(); |
|
|
|
InputStream inputStream = System.in; |
|
|
|
OutputStream outputStream = System.out; |
|
|
|
|
|
|
|
while (pm.running) { |
|
|
|
pm.showMenu(inputStream, outputStream); |
|
|
|
pm.showMenu(null, null); |
|
|
|
} |
|
|
|
System.exit(0); |
|
|
|
} |
|
|
|
|
|
|
|
public PasswordManager() { |
|
|
|
System.out.println("Hello World"); |
|
|
|
try { |
|
|
|
outputStream.write("Hello World\n".getBytes(StandardCharsets.UTF_8)); |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void listVaults() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -34,6 +39,13 @@ public class PasswordManager implements PasswordManagerInterface { |
|
|
|
|
|
|
|
@Override |
|
|
|
public void showMenu(InputStream inputStream, OutputStream outputStream) { |
|
|
|
if (inputStream == null) { |
|
|
|
inputStream = this.inputStream; |
|
|
|
} |
|
|
|
if (outputStream == null) { |
|
|
|
outputStream = this.outputStream; |
|
|
|
} |
|
|
|
|
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
Scanner scan = new Scanner(inputStream); |
|
|
|
running = true; |
|
|
|