Package jline.internal
Class TerminalLineSettings
java.lang.Object
jline.internal.TerminalLineSettings
Provides access to terminal line settings via stty.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private long
static final String
static final String
static final String
private String
static final String
static final String
private static final Object
private static final Method
private static final Map<String,
TerminalLineSettings> private String
private String
private static final boolean
private String
private static final String
private boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDeprecated.TerminalLineSettings
(String ttyDevice) Deprecated.private
TerminalLineSettings
(String ttyDevice, boolean unused) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private String
private boolean
fetchConfig
(String name) int
getProperty
(String name) Get the value of a stty property, including the management of a cache.protected static int
getProperty
(String name, String stty) getPropertyAsString
(String name) protected static String
getPropertyAsString
(String name, String stty) Parses a stty output (provided by stty -a) and return the value of a given property.static TerminalLineSettings
getSettings
(String device) private static ProcessBuilder
private static int
parseControlChar
(String str) void
restore()
void
void
private String
void
static String
-
Field Details
-
JLINE_STTY
- See Also:
-
DEFAULT_STTY
- See Also:
-
JLINE_SH
- See Also:
-
DEFAULT_SH
- See Also:
-
UNDEFINED
-
DEFAULT_TTY
- See Also:
-
SUPPORTS_REDIRECT
private static final boolean SUPPORTS_REDIRECT -
REDIRECT_INHERIT
-
REDIRECT_INPUT_METHOD
-
SETTINGS
-
sttyCommand
-
shCommand
-
ttyDevice
-
config
-
initialConfig
-
configLastFetched
private long configLastFetched -
useRedirect
private boolean useRedirect
-
-
Constructor Details
-
TerminalLineSettings
Deprecated.- Throws:
IOException
InterruptedException
-
TerminalLineSettings
Deprecated.- Throws:
IOException
InterruptedException
-
TerminalLineSettings
private TerminalLineSettings(String ttyDevice, boolean unused) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
-
Method Details
-
getSettings
public static TerminalLineSettings getSettings(String device) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
getTtyDevice
-
getConfig
-
restore
- Throws:
IOException
InterruptedException
-
get
- Throws:
IOException
InterruptedException
-
set
- Throws:
IOException
InterruptedException
-
set
- Throws:
IOException
InterruptedException
-
undef
- Throws:
IOException
InterruptedException
-
getProperty
Get the value of a stty property, including the management of a cache.
- Parameters:
name
- the stty property.- Returns:
- the stty property value.
-
getPropertyAsString
-
fetchConfig
-
getPropertyAsString
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
-
parseControlChar
-
stty
- Throws:
IOException
InterruptedException
-
exec
- Throws:
IOException
InterruptedException
-
inheritInput
- Throws:
Exception
-
waitAndCapture
- Throws:
IOException
InterruptedException
-
close
-