jline.internal
Class TerminalLineSettings

java.lang.Object
  extended by 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é

Field Summary
static java.lang.String DEFAULT_SH
           
static java.lang.String DEFAULT_STTY
           
static java.lang.String JLINE_SH
           
static java.lang.String JLINE_STTY
           
 
Constructor Summary
TerminalLineSettings()
           
 
Method Summary
 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  int getProperty(java.lang.String name, java.lang.String stty)
           Parses a stty output (provided by stty -a) and return the value of a given property.
 void restore()
           
 void set(java.lang.String args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

TerminalLineSettings

public TerminalLineSettings()
                     throws java.io.IOException,
                            java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException
Method Detail

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

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.

getProperty

protected int getProperty(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.


Copyright © 2008-2011 Sonatype. All Rights Reserved.