|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cedarsoft.utils.AbstractCmdLine
com.cedarsoft.utils.DefaultCmdLine
public class DefaultCmdLine
The default command line
| Constructor Summary | |
|---|---|
DefaultCmdLine()
|
|
| Method Summary | |
|---|---|
protected ConsolePrinter |
getConsolePrinter()
|
java.io.InputStream |
getIn()
|
java.io.PrintStream |
getOut()
|
static boolean |
isAnsiAware()
|
void |
pause(int seconds)
Pauses the script |
java.lang.String |
read(java.lang.String message)
Reads a string form the console |
java.lang.String |
read(java.lang.String message,
java.lang.String defaultValue)
Reads a string from the console. |
boolean |
readBoolean(java.lang.String message)
Reads a boolean from the command line |
int |
readInt(java.lang.String message)
Reads an int from the console |
int |
readInt(java.lang.String message,
int lower,
int upper)
Reads an int from the console |
| Methods inherited from class com.cedarsoft.utils.AbstractCmdLine |
|---|
error, out, out, outNl, printPossibleElements, read, read, read, readSelection, readSelection, success, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCmdLine()
| Method Detail |
|---|
public static boolean isAnsiAware()
@NotNull protected ConsolePrinter getConsolePrinter()
getConsolePrinter in class AbstractCmdLine
public boolean readBoolean(@NotNull
java.lang.String message)
throws java.io.IOException
CmdLine
message - the message that is shown
java.io.IOException
@NotNull
public java.lang.String read(@NotNull
java.lang.String message)
CmdLine
message - the mssage
@NotNull
public java.lang.String read(@NotNull
java.lang.String message,
@Nullable
java.lang.String defaultValue)
CmdLine
message - the messagedefaultValue - the default value
@NotNull public java.io.InputStream getIn()
@NotNull public java.io.PrintStream getOut()
getOut in class AbstractCmdLine
public int readInt(@NotNull
java.lang.String message,
int lower,
int upper)
CmdLine
message - the messagelower - the lower boundsupper - the upper bounds
public int readInt(@NotNull
java.lang.String message)
throws java.io.IOException
CmdLine
message - the message
java.io.IOExceptionpublic void pause(int seconds)
CmdLine
seconds - the seconds that it is paused
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||