Class AbstractWindowsConsoleWriter

java.lang.Object
java.io.Writer
org.jline.terminal.impl.AbstractWindowsConsoleWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public abstract class AbstractWindowsConsoleWriter extends Writer
Base class for writing to Windows console.

The AbstractWindowsConsoleWriter class provides a foundation for writing text to the Windows console. It extends the standard Writer class and handles the common aspects of writing to the console, while leaving the actual console interaction to be implemented by concrete subclasses.

This class is necessary because standard Java output streams don't work well with the Windows console, particularly for non-ASCII characters and color output. Instead of using standard output streams, Windows terminal implementations use this writer to directly interact with the Windows console API.

Concrete subclasses must implement the writeConsole(char[], int) method to perform the actual writing to the console using platform-specific mechanisms (e.g., JNI, JNA, or FFM).

See Also: