Top Description Constructors Methods
org.fusesource.jansi

public Class AnsiMain

extends Object
Class Inheritance
Imports
java.io.BufferedReader, .Closeable, .File, .FileInputStream, .IOException, .InputStream, .InputStreamReader, .PrintStream, java.util.Properties, org.fusesource.jansi.Ansi.Attribute, org.fusesource.jansi.internal.CLibrary, .JansiLoader, .Kernel32, .MingwSupport

Main 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):

If stdout is redirected to a file (> 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.

See Also
AnsiConsole

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
private static void
diagnoseTty(boolean stderr)

private static String
private static String
public static void
main(String... args)

private static void
private static void
testAnsi(boolean stderr)

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AnsiMainback to summary
public AnsiMain()

Method Detail

closeQuietlyback to summary
private static void closeQuietly(Closeable c)
diagnoseTtyback to summary
private static void diagnoseTty(boolean stderr)
getJansiVersionback to summary
private static String getJansiVersion()
getPomPropertiesVersionback to summary
private static String getPomPropertiesVersion(String path) throws IOException
mainback to summary
public static void main(String... args) throws IOException
printJansiLogoDemoback to summary
private static void printJansiLogoDemo() throws IOException
testAnsiback to summary
private static void testAnsi(boolean stderr)
writeFileContentback to summary
private static void writeFileContent(File f) throws IOException