Package org.duracloud.common.util
Class ConsolePrompt
- java.lang.Object
-
- org.duracloud.common.util.ConsolePrompt
-
public class ConsolePrompt extends Object
Class used for prompting users for input from the command line. This class is simply a wrapper for java.io.Console. This class was created because java.io.Console is a final class which makes it difficult to mock for unit tests.
-
-
Constructor Summary
Constructors Constructor Description ConsolePrompt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Consoleformat(String fmt, Object... args)Consoleprintf(String fmt, Object... args)Readerreader()StringreadLine()StringreadLine(String fmt, Object... args)char[]readPassword()char[]readPassword(String fmt, Object... args)PrintWriterwriter()
-
-
-
Method Detail
-
flush
public void flush()
-
reader
public Reader reader()
-
readLine
public String readLine()
-
readPassword
public char[] readPassword()
-
writer
public PrintWriter writer()
-
-