public class JavaConsole extends Object implements ConsoleWrapper
| Constructor and Description |
|---|
JavaConsole() |
| Modifier and Type | Method and Description |
|---|---|
void |
format(String fmt,
Object... args)
Writes a formatted string to this console's output stream using
the specified format string and arguments.
|
boolean |
hasConsole()
Check if the wrapper does have a console.
|
void |
printf(String format,
Object... args)
A convenience method to write a formatted string to this console's
output stream using the specified format string and arguments.
|
String |
readLine(String fmt,
Object... args)
Provides a formatted prompt, then reads a single line of text from the
console.
|
char[] |
readPassword(String fmt,
Object... args)
Provides a formatted prompt, then reads a password or passphrase from
the console with echoing disabled.
|
public void format(String fmt, Object... args) throws IllegalFormatException
ConsoleWrapperformat in interface ConsoleWrapperIllegalFormatExceptionpublic void printf(String format, Object... args) throws IllegalFormatException
ConsoleWrapperprintf in interface ConsoleWrapperIllegalFormatExceptionpublic String readLine(String fmt, Object... args) throws IOError
ConsoleWrapperreadLine in interface ConsoleWrapperIOErrorpublic char[] readPassword(String fmt, Object... args) throws IllegalFormatException, IOError
ConsoleWrapperreadPassword in interface ConsoleWrapperIOErrorIllegalFormatExceptionpublic boolean hasConsole()
ConsoleWrapperhasConsole in interface ConsoleWrapperCopyright © 2018 JBoss by Red Hat. All rights reserved.