public class AnsiRenderer extends Object
@|code(,code)* text|@Examples:
@|bold Hello|@
@|bold,red Warning!|@
| Modifier and Type | Class and Description |
|---|---|
static class |
AnsiRenderer.Code |
| Modifier and Type | Field and Description |
|---|---|
static String |
BEGIN_TOKEN |
static String |
CODE_LIST_SEPARATOR |
static String |
CODE_TEXT_SEPARATOR |
static String |
END_TOKEN |
| Modifier and Type | Method and Description |
|---|---|
static String |
render(String input) |
static Appendable |
render(String input,
Appendable target)
Renders the given input to the target Appendable.
|
static String |
render(String text,
String... codes) |
static String |
renderCodes(String... codes)
Renders
AnsiRenderer.Code names as an ANSI escape string. |
static String |
renderCodes(String codes)
Renders
AnsiRenderer.Code names as an ANSI escape string. |
static boolean |
test(String text) |
public static final String BEGIN_TOKEN
public static final String END_TOKEN
public static final String CODE_TEXT_SEPARATOR
public static final String CODE_LIST_SEPARATOR
public static String render(String input) throws IllegalArgumentException
IllegalArgumentExceptionpublic static Appendable render(String input, Appendable target) throws IOException
input - source to rendertarget - render onto this target Appendable.IOException - If an I/O error occurspublic static String renderCodes(String... codes)
AnsiRenderer.Code names as an ANSI escape string.codes - The code names to renderpublic static String renderCodes(String codes)
AnsiRenderer.Code names as an ANSI escape string.codes - A space separated list of code names to renderCopyright © 2009–2018 FuseSource, Corp.. All rights reserved.