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
ConstructorDescriptionAnsiPrintStream
(AnsiOutputStream out, boolean autoFlush) AnsiPrintStream
(AnsiOutputStream out, boolean autoFlush, String encoding) -
Method Summary
Modifier and TypeMethodDescriptiongetMode()
protected AnsiOutputStream
getOut()
int
Returns the width of the terminal associated with this stream or 0.getType()
void
install()
boolean
void
void
setResetAtUninstall
(boolean resetAtClose) toString()
void
Methods 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, writeBytes
Methods 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
-