Package jline.internal
Class TerminalLineSettings
- java.lang.Object
-
- jline.internal.TerminalLineSettings
-
public final class TerminalLineSettings extends java.lang.Object
Provides 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.String
DEFAULT_SH
static java.lang.String
DEFAULT_STTY
static java.lang.String
DEFAULT_TTY
static java.lang.String
JLINE_SH
static java.lang.String
JLINE_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.String
get(java.lang.String args)
java.lang.String
getConfig()
int
getProperty(java.lang.String name)
Get the value of a stty property, including the management of a cache.protected static int
getProperty(java.lang.String name, java.lang.String stty)
java.lang.String
getPropertyAsString(java.lang.String name)
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.static TerminalLineSettings
getSettings(java.lang.String device)
java.lang.String
getTtyDevice()
void
restore()
void
set(java.lang.String args)
void
set(java.lang.String... args)
void
undef(java.lang.String name)
static java.lang.String
waitAndCapture(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.InterruptedException
Deprecated.- Throws:
java.io.IOException
java.lang.InterruptedException
-
TerminalLineSettings
@Deprecated public TerminalLineSettings(java.lang.String ttyDevice) throws java.io.IOException, java.lang.InterruptedException
Deprecated.- Throws:
java.io.IOException
java.lang.InterruptedException
-
-
Method Detail
-
getSettings
public static TerminalLineSettings getSettings(java.lang.String device) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.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.IOException
java.lang.InterruptedException
-
get
public java.lang.String get(java.lang.String args) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
set
public void set(java.lang.String args) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
set
public void set(java.lang.String... args) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
-
undef
public void undef(java.lang.String name) throws java.io.IOException, java.lang.InterruptedException
- Throws:
java.io.IOException
java.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.IOException
java.lang.InterruptedException
-
-