public class AnsiMain
extends java.lang.Object
If no system property is set and output is sent to a terminal (no redirect to a file):
RESET_ANSI_AT_CLOSE mode,RESET_ANSI_AT_CLOSE mode also, since they
support natively ANSI escape sequences like any Unix terminal,WINDOWS mode.> out.txt), System.out should switch to STRIP_ANSI.
Same for stderr redirection (2> err.txt) which should affect System.err mode.
The results will vary if you play with jansi.passthrough, jansi.strip or
jansi.force system property, or if you redirect output to a file.
If you have a specific situation that is not covered, please report precise conditions to reproduce the issue and ideas on how to detect precisely the affected situation.
AnsiConsole| Constructor and Description |
|---|
AnsiMain() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
closeQuietly(java.io.Closeable c) |
private static void |
diagnoseTty(boolean stderr) |
private static java.lang.String |
getJansiVersion() |
private static java.lang.String |
getPomPropertiesVersion(java.lang.String path) |
static void |
main(java.lang.String... args) |
private static void |
printJansiLogoDemo() |
private static void |
testAnsi(boolean stderr) |
private static void |
writeFileContent(java.io.File f) |
public static void main(java.lang.String... args)
throws java.io.IOException
java.io.IOExceptionprivate static java.lang.String getJansiVersion()
private static void diagnoseTty(boolean stderr)
private static void testAnsi(boolean stderr)
private static java.lang.String getPomPropertiesVersion(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionprivate static void printJansiLogoDemo()
throws java.io.IOException
java.io.IOExceptionprivate static void writeFileContent(java.io.File f)
throws java.io.IOException
java.io.IOExceptionprivate static void closeQuietly(java.io.Closeable c)