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
ConsoleWrapper
format
in interface ConsoleWrapper
IllegalFormatException
public void printf(String format, Object... args) throws IllegalFormatException
ConsoleWrapper
printf
in interface ConsoleWrapper
IllegalFormatException
public String readLine(String fmt, Object... args) throws IOError
ConsoleWrapper
readLine
in interface ConsoleWrapper
IOError
public char[] readPassword(String fmt, Object... args) throws IllegalFormatException, IOError
ConsoleWrapper
readPassword
in interface ConsoleWrapper
IOError
IllegalFormatException
public boolean hasConsole()
ConsoleWrapper
hasConsole
in interface ConsoleWrapper
Copyright © 2023 JBoss by Red Hat. All rights reserved.