Package org.openhab.core.io.console
Interface Console
- All Known Implementing Classes:
OSGiConsole
@NonNullByDefault
public interface Console
This interface must be implemented by consoles which want to use the
ConsoleInterpreter.
It allows basic output commands.- Author:
- Kai Kreuzer - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefault voidvoidvoidprintUsage(String s) usage output is treated differently from other output as it might differ between different kinds of consolesdefault StringReads a line from the console.
-
Method Details
-
printf
-
print
-
println
-
printUsage
usage output is treated differently from other output as it might differ between different kinds of consoles- Parameters:
s- the main usage string (console independent)
-
readLine
Reads a line from the console. The prompt is displayed before the line is read.- Parameters:
prompt- the prompt to displaymask- the character to use for masking input (e.g. '*'), or null if no masking is required- Returns:
- the line read from the console
- Throws:
IOException- if an I/O error occurs
-