Top Description Constructors Methods
org.fusesource.jansi

public Class AnsiPrintStream

extends PrintStream
Class Inheritance
Imports
java.io.IOException, .PrintStream, .UnsupportedEncodingException, org.fusesource.jansi.io.AnsiOutputStream

Simple PrintStream holding an AnsiOutputStream. This allows changing the mode in which the underlying AnsiOutputStream operates.

Constructor Summary

AccessConstructor and Description
public
AnsiPrintStream(AnsiOutputStream out, boolean autoFlush)

public
AnsiPrintStream(AnsiOutputStream out, boolean autoFlush, String encoding)

Method Summary

Modifier and TypeMethod and Description
public AnsiColors
public AnsiMode
protected AnsiOutputStream
public int
getTerminalWidth()

Returns the width of the terminal associated with this stream or 0.

public AnsiType
public void
public boolean
public void
setMode(AnsiMode ansiMode)

public void
setResetAtUninstall(boolean resetAtClose)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
Inherited from java.io.PrintStream:
appendappendappendcharsetcheckErrorclearErrorcloseflushformatformatprintprintprintprintprintprintprintprintprintprintfprintfprintlnprintlnprintlnprintlnprintlnprintlnprintlnprintlnprintlnprintlnsetErrorwritewritewritewriteBytes

Constructor Detail

AnsiPrintStreamback to summary
public AnsiPrintStream(AnsiOutputStream out, boolean autoFlush)
AnsiPrintStreamback to summary
public AnsiPrintStream(AnsiOutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException

Method Detail

getColorsback to summary
public AnsiColors getColors()
getModeback to summary
public AnsiMode getMode()
getOutback to summary
protected AnsiOutputStream getOut()
getTerminalWidthback to summary
public int getTerminalWidth()

Returns the width of the terminal associated with this stream or 0.

Since
2.2
getTypeback to summary
public AnsiType getType()
installback to summary
public void install() throws IOException
isResetAtUninstallback to summary
public boolean isResetAtUninstall()
setModeback to summary
public void setMode(AnsiMode ansiMode)
setResetAtUninstallback to summary
public void setResetAtUninstall(boolean resetAtClose)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
uninstallback to summary
public void uninstall() throws IOException