jline
Class NoInterruptUnixTerminal
java.lang.Object
jline.TerminalSupport
jline.UnixTerminal
jline.NoInterruptUnixTerminal
- All Implemented Interfaces:
- Terminal
public class NoInterruptUnixTerminal
- extends UnixTerminal
Non-interruptable (via CTRL-C) UnixTerminal
.
- Since:
- 2.0
Method Summary |
void |
init()
Remove line-buffered input by invoking "stty -icanon min 1"
against the current terminal. |
void |
restore()
Restore the original terminal configuration, which can be used when
shutting down the console reader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoInterruptUnixTerminal
public NoInterruptUnixTerminal()
throws Exception
- Throws:
Exception
init
public void init()
throws Exception
- Description copied from class:
UnixTerminal
- Remove line-buffered input by invoking "stty -icanon min 1"
against the current terminal.
- Specified by:
init
in interface Terminal
- Overrides:
init
in class UnixTerminal
- Throws:
Exception
restore
public void restore()
throws Exception
- Description copied from class:
UnixTerminal
- Restore the original terminal configuration, which can be used when
shutting down the console reader. The ConsoleReader cannot be
used after calling this method.
- Specified by:
restore
in interface Terminal
- Overrides:
restore
in class UnixTerminal
- Throws:
Exception
Copyright © 2008-2011 Sonatype. All Rights Reserved.