public class BatchTerminal extends Object implements Terminal
Terminal interface for batch mode. This implementation produces
output that's more sensible for collecting to a log file or for parsing. There is no limit on the
number of output lines, and the output doesn't contain any escape sequences for formatting.| Modifier and Type | Field and Description |
|---|---|
private static TerminalPrinter |
TERMINAL_PRINTER |
| Constructor and Description |
|---|
BatchTerminal() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close() |
TerminalSize |
doResizeIfNecessary() |
CursorPosition |
getCursorPosition() |
TerminalSize |
getSize() |
TerminalPrinter |
getTerminalPrinter(int startRow) |
void |
hideCursor() |
KeyPress |
pollKeyPress() |
void |
refresh() |
void |
setCursorPosition(int column,
int row) |
private static final TerminalPrinter TERMINAL_PRINTER
public BatchTerminal()
@Nullable public TerminalSize getSize()
@Nullable public TerminalSize doResizeIfNecessary()
doResizeIfNecessary in interface Terminal@Nullable public KeyPress pollKeyPress()
pollKeyPress in interface Terminalpublic CursorPosition getCursorPosition()
getCursorPosition in interface Terminalpublic void setCursorPosition(int column, int row)
setCursorPosition in interface Terminalpublic void hideCursor()
hideCursor in interface Terminalpublic TerminalPrinter getTerminalPrinter(int startRow)
getTerminalPrinter in interface Terminalpublic void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.