jline.internal
Class TerminalLineSettings

java.lang.Object
  extended by jline.internal.TerminalLineSettings

public final class TerminalLineSettings
extends 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 String DEFAULT_SH
           
static String DEFAULT_STTY
           
static String JLINE_SH
           
static String JLINE_STTY
           
 
Constructor Summary
TerminalLineSettings()
           
 
Method Summary
 String get(String args)
           
 String getConfig()
           
 int getProperty(String name)
           Get the value of a stty property, including the management of a cache.
protected  int getProperty(String name, String stty)
           Parses a stty output (provided by stty -a) and return the value of a given property.
 void restore()
           
 void set(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 String JLINE_STTY
See Also:
Constant Field Values

DEFAULT_STTY

public static final String DEFAULT_STTY
See Also:
Constant Field Values

JLINE_SH

public static final String JLINE_SH
See Also:
Constant Field Values

DEFAULT_SH

public static final String DEFAULT_SH
See Also:
Constant Field Values
Constructor Detail

TerminalLineSettings

public TerminalLineSettings()
                     throws IOException,
                            InterruptedException
Throws:
IOException
InterruptedException
Method Detail

getConfig

public String getConfig()

restore

public void restore()
             throws IOException,
                    InterruptedException
Throws:
IOException
InterruptedException

get

public String get(String args)
           throws IOException,
                  InterruptedException
Throws:
IOException
InterruptedException

set

public void set(String args)
         throws IOException,
                InterruptedException
Throws:
IOException
InterruptedException

getProperty

public int getProperty(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(String name,
                          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.