public abstract class

TerminalSupport

extends Object
implements Terminal
java.lang.Object
   ↳ jline.TerminalSupport
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Provides support for Terminal instances.

Summary

Constants
int DEFAULT_HEIGHT
int DEFAULT_WIDTH
Protected Constructors
TerminalSupport(boolean supported)
Public Methods
int getHeight()
String getOutputEncoding()
int getWidth()
boolean hasWeirdWrap()
Defaults to true which was the behaviour before this method was added.
void init()
synchronized boolean isAnsiSupported()
synchronized boolean isEchoEnabled()
final boolean isSupported()
void reset()
void restore()
synchronized void setEchoEnabled(boolean enabled)
InputStream wrapInIfNeeded(InputStream in)
When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.
OutputStream wrapOutIfNeeded(OutputStream out)
Subclass to change behavior if needed.
Protected Methods
synchronized void setAnsiSupported(boolean supported)
[Expand]
Inherited Methods
From class java.lang.Object
From interface jline.Terminal

Constants

public static final int DEFAULT_HEIGHT

Constant Value: 24 (0x00000018)

public static final int DEFAULT_WIDTH

Constant Value: 80 (0x00000050)

Protected Constructors

protected TerminalSupport (boolean supported)

Public Methods

public int getHeight ()

public String getOutputEncoding ()

public int getWidth ()

public boolean hasWeirdWrap ()

Defaults to true which was the behaviour before this method was added.

public void init ()

Throws
Exception

public synchronized boolean isAnsiSupported ()

public synchronized boolean isEchoEnabled ()

public final boolean isSupported ()

public void reset ()

Throws
Exception

public void restore ()

Throws
Exception

public synchronized void setEchoEnabled (boolean enabled)

public InputStream wrapInIfNeeded (InputStream in)

When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.

Throws
IOException

public OutputStream wrapOutIfNeeded (OutputStream out)

Subclass to change behavior if needed.

Returns
  • the passed out

Protected Methods

protected synchronized void setAnsiSupported (boolean supported)