public class AnsiEscapeDecoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AnsiEscapeDecoder.ColoredChunksAcceptor
Deprecated.
use
AnsiEscapeDecoder.ColoredTextAcceptor instead |
static interface |
AnsiEscapeDecoder.ColoredTextAcceptor |
Constructor and Description |
---|
AnsiEscapeDecoder() |
Modifier and Type | Method and Description |
---|---|
void |
escapeText(java.lang.String text,
Key outputType,
AnsiEscapeDecoder.ColoredTextAcceptor textAcceptor)
Parses ansi-color codes from text and sends text fragments with color attributes to textAcceptor
|
protected Key |
getCurrentOutputAttributes(Key outputType) |
public void escapeText(java.lang.String text, Key outputType, AnsiEscapeDecoder.ColoredTextAcceptor textAcceptor)
text
- a string with ANSI escape sequencesoutputType
- stdout/stderr/system (from ProcessOutputTypes
)textAcceptor
- receives text fragments with color attributes.
It can implement ColoredChunksAcceptor to receive list of pairs (text, attribute).