Package org.jline.jansi
Class AnsiPrintStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
org.jline.jansi.AnsiPrintStream
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
Simple PrintStream holding an AnsiOutputStream.
This allows changing the mode in which the underlying AnsiOutputStream operates.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionAnsiPrintStream(AnsiOutputStream out, boolean autoFlush) AnsiPrintStream(AnsiOutputStream out, boolean autoFlush, String encoding) -
Method Summary
Modifier and TypeMethodDescriptiongetMode()protected AnsiOutputStreamgetOut()intReturns the width of the terminal associated with this stream or 0.getType()voidinstall()booleanvoidvoidsetResetAtUninstall(boolean resetAtClose) toString()voidMethods inherited from class java.io.PrintStream
append, append, append, charset, 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, writeBytesMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
AnsiPrintStream
-
AnsiPrintStream
public AnsiPrintStream(AnsiOutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException - Throws:
UnsupportedEncodingException
-
-
Method Details
-
getOut
-
getType
-
getColors
-
getMode
-
setMode
-
isResetAtUninstall
public boolean isResetAtUninstall() -
setResetAtUninstall
public void setResetAtUninstall(boolean resetAtClose) -
getTerminalWidth
public int getTerminalWidth()Returns the width of the terminal associated with this stream or 0.- Since:
- 2.2
-
install
- Throws:
IOException
-
uninstall
- Throws:
IOException
-
toString
-