Package jline.internal
Class TerminalLineSettings
- java.lang.Object
-
- jline.internal.TerminalLineSettings
-
public final class TerminalLineSettings extends java.lang.ObjectProvides access to terminal line settings via stty.- Since:
- 2.0
- Author:
- Marc Prud'hommeaux, Dale Kemp, Jason Dillon, Jean-Baptiste Onofré, Guillaume Nodet
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SHstatic java.lang.StringDEFAULT_STTYstatic java.lang.StringDEFAULT_TTYstatic java.lang.StringJLINE_SHstatic java.lang.StringJLINE_STTY
-
Constructor Summary
Constructors Constructor Description TerminalLineSettings()Deprecated.TerminalLineSettings(java.lang.String ttyDevice)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringget(java.lang.String args)java.lang.StringgetConfig()intgetProperty(java.lang.String name)Get the value of a stty property, including the management of a cache.protected static intgetProperty(java.lang.String name, java.lang.String stty)java.lang.StringgetPropertyAsString(java.lang.String name)protected static java.lang.StringgetPropertyAsString(java.lang.String name, java.lang.String stty)Parses a stty output (provided by stty -a) and return the value of a given property.static TerminalLineSettingsgetSettings(java.lang.String device)java.lang.StringgetTtyDevice()voidrestore()voidset(java.lang.String args)voidset(java.lang.String... args)voidundef(java.lang.String name)static java.lang.StringwaitAndCapture(java.lang.Process p)
-
-
-
Field Detail
-
JLINE_STTY
public static final java.lang.String JLINE_STTY
- See Also:
- Constant Field Values
-
DEFAULT_STTY
public static final java.lang.String DEFAULT_STTY
- See Also:
- Constant Field Values
-
JLINE_SH
public static final java.lang.String JLINE_SH
- See Also:
- Constant Field Values
-
DEFAULT_SH
public static final java.lang.String DEFAULT_SH
- See Also:
- Constant Field Values
-
DEFAULT_TTY
public static final java.lang.String DEFAULT_TTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TerminalLineSettings
@Deprecated public TerminalLineSettings() throws java.io.IOException, java.lang.InterruptedExceptionDeprecated.- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
TerminalLineSettings
@Deprecated public TerminalLineSettings(java.lang.String ttyDevice) throws java.io.IOException, java.lang.InterruptedExceptionDeprecated.- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
-
Method Detail
-
getSettings
public static TerminalLineSettings getSettings(java.lang.String device) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
getTtyDevice
public java.lang.String getTtyDevice()
-
getConfig
public java.lang.String getConfig()
-
restore
public void restore() throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
get
public java.lang.String get(java.lang.String args) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
set
public void set(java.lang.String args) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
set
public void set(java.lang.String... args) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
undef
public void undef(java.lang.String name) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
getProperty
public int getProperty(java.lang.String name)
Get the value of a stty property, including the management of a cache.
- Parameters:
name- the stty property.- Returns:
- the stty property value.
-
getPropertyAsString
public java.lang.String getPropertyAsString(java.lang.String name)
-
getPropertyAsString
protected static java.lang.String getPropertyAsString(java.lang.String name, java.lang.String stty)Parses a stty output (provided by stty -a) and return the value of a given property.
- Parameters:
name- property name.stty- string resulting of stty -a execution.- Returns:
- value of the given property.
-
getProperty
protected static int getProperty(java.lang.String name, java.lang.String stty)
-
waitAndCapture
public static java.lang.String waitAndCapture(java.lang.Process p) throws java.io.IOException, java.lang.InterruptedException- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
-