- java.lang.Object
-
- java.io.Writer
-
- java.io.PrintWriter
-
- de.carne.io.ConsoleWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public final class ConsoleWriter extends java.io.PrintWriterPrintWriter implementation which supports ANSI sequences and uses the System.console() for emitting it's output.If System.console() yields
null, System.out is used instead. In the latter case any ANSI sequence is filtered out prior to emitting the output.
-
-
Constructor Summary
Constructors Constructor Description ConsoleWriter()Constructs a new ConsoleWriter instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAnsiEnabled()Checks whether this instance is capable of emitting ANSI sequences.-
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
-
-
-
-
Constructor Detail
-
ConsoleWriter
public ConsoleWriter()
Constructs a new ConsoleWriter instance.
-
-