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 Terminal
public CursorPosition getCursorPosition()
getCursorPosition
in interface Terminal
public void setCursorPosition(int column, int row)
setCursorPosition
in interface Terminal
public void hideCursor()
hideCursor
in interface Terminal
public TerminalPrinter getTerminalPrinter(int startRow)
getTerminalPrinter
in interface Terminal
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.