Package org.fusesource.jansi
Class AnsiMain
- java.lang.Object
-
- org.fusesource.jansi.AnsiMain
-
public class AnsiMain extends java.lang.ObjectMain class for the library, providing executable jar to diagnose Jansi setup.If no system property is set and output is sent to a terminal (no redirect to a file):
- any terminal on any Unix should get
RESET_ANSI_AT_CLOSEmode, - on Windows, Git-bash or Cygwin terminals should get
RESET_ANSI_AT_CLOSEmode also, since they support natively ANSI escape sequences like any Unix terminal, - on Windows, cmd.exe, PowerShell or Git-cmd terminals should get
WINDOWSmode.
> out.txt), System.out should switch toSTRIP_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.striporjansi.forcesystem 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.
- See Also:
AnsiConsole
- any terminal on any Unix should get
-
-
Constructor Summary
Constructors Constructor Description AnsiMain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidcloseQuietly(java.io.Closeable c)private static voiddiagnoseTty(boolean stderr)private static java.lang.StringgetJansiVersion()private static java.lang.StringgetPomPropertiesVersion(java.lang.String path)static voidmain(java.lang.String... args)private static voidprintJansiLogoDemo()private static voidtestAnsi(boolean stderr)private static voidwriteFileContent(java.io.File f)
-
-
-
Method Detail
-
main
public static void main(java.lang.String... args) throws java.io.IOException- Throws:
java.io.IOException
-
getJansiVersion
private static java.lang.String getJansiVersion()
-
diagnoseTty
private static void diagnoseTty(boolean stderr)
-
testAnsi
private static void testAnsi(boolean stderr)
-
getPomPropertiesVersion
private static java.lang.String getPomPropertiesVersion(java.lang.String path) throws java.io.IOException- Throws:
java.io.IOException
-
printJansiLogoDemo
private static void printJansiLogoDemo() throws java.io.IOException- Throws:
java.io.IOException
-
writeFileContent
private static void writeFileContent(java.io.File f) throws java.io.IOException- Throws:
java.io.IOException
-
closeQuietly
private static void closeQuietly(java.io.Closeable c)
-
-