Java Doc for UnixTerminal.java in  » Development » jLine » jline » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Development » jLine » jline 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jline.Terminal
      jline.UnixTerminal

UnixTerminal
public class UnixTerminal extends Terminal (Code)

Terminal that is used for unix platforms. Terminal initialization is handled by issuing the stty command against the /dev/tty file to disable character echoing and enable character input. All known unix systems (including Linux and Macintosh OS X) support the stty), so this implementation should work for an reasonable POSIX system.


author:
   Marc Prud'hommeaux
author:
   Updates Dale Kemp 2005-12-03

Inner Class :static class ReplayPrefixOneCharInputStream extends InputStream

Field Summary
final public static  shortARROW_DOWN
    
final public static  shortARROW_LEFT
    
final public static  shortARROW_PREFIX
    
final public static  shortARROW_RIGHT
    
final public static  shortARROW_START
    
final public static  shortARROW_UP
    
final public static  shortDEL_SECOND
    
final public static  shortDEL_THIRD
    
final public static  shortEND_CODE
    
final public static  shortHOME_CODE
    
final public static  shortO_PREFIX
    
 Stringencoding
    
 InputStreamReaderreplayReader
    
 ReplayPrefixOneCharInputStreamreplayStream
    

Constructor Summary
public  UnixTerminal()
    

Method Summary
protected  voidcheckBackspace()
    
public synchronized  voiddisableEcho()
    
public synchronized  voidenableEcho()
    
public  booleangetEcho()
    
public static  StringgetSttyCommand()
     The command to use to set the terminal options.
public  intgetTerminalHeight()
     Returns the value of "stty size" height param.
public  intgetTerminalWidth()
     Returns the value of "stty size" width param.
public  voidinitializeTerminal()
     Remove line-buffered input by invoking "stty -icanon min 1" against the current terminal.
public synchronized  booleanisEchoEnabled()
    
public  booleanisSupported()
    
public  intreadVirtualKey(InputStream in)
    
public  voidrestoreTerminal()
     Restore the original terminal configuration, which can be used when shutting down the console reader.
public static  voidsetSttyCommand(String cmd)
     The command to use to set the terminal options.

Field Detail
ARROW_DOWN
final public static short ARROW_DOWN(Code)



ARROW_LEFT
final public static short ARROW_LEFT(Code)



ARROW_PREFIX
final public static short ARROW_PREFIX(Code)



ARROW_RIGHT
final public static short ARROW_RIGHT(Code)



ARROW_START
final public static short ARROW_START(Code)



ARROW_UP
final public static short ARROW_UP(Code)



DEL_SECOND
final public static short DEL_SECOND(Code)



DEL_THIRD
final public static short DEL_THIRD(Code)



END_CODE
final public static short END_CODE(Code)



HOME_CODE
final public static short HOME_CODE(Code)



O_PREFIX
final public static short O_PREFIX(Code)



encoding
String encoding(Code)



replayReader
InputStreamReader replayReader(Code)



replayStream
ReplayPrefixOneCharInputStream replayStream(Code)




Constructor Detail
UnixTerminal
public UnixTerminal()(Code)




Method Detail
checkBackspace
protected void checkBackspace()(Code)



disableEcho
public synchronized void disableEcho()(Code)



enableEcho
public synchronized void enableEcho()(Code)



getEcho
public boolean getEcho()(Code)



getSttyCommand
public static String getSttyCommand()(Code)
The command to use to set the terminal options. Defaults to "stty", or the value of the system property "jline.sttyCommand".



getTerminalHeight
public int getTerminalHeight()(Code)
Returns the value of "stty size" height param. Note: this method caches the value from the first time it is called in order to increase speed, which means that changing to size of the terminal will not be reflected in the console.



getTerminalWidth
public int getTerminalWidth()(Code)
Returns the value of "stty size" width param. Note: this method caches the value from the first time it is called in order to increase speed, which means that changing to size of the terminal will not be reflected in the console.



initializeTerminal
public void initializeTerminal() throws IOException, InterruptedException(Code)
Remove line-buffered input by invoking "stty -icanon min 1" against the current terminal.



isEchoEnabled
public synchronized boolean isEchoEnabled()(Code)



isSupported
public boolean isSupported()(Code)



readVirtualKey
public int readVirtualKey(InputStream in) throws IOException(Code)



restoreTerminal
public void restoreTerminal() throws Exception(Code)
Restore the original terminal configuration, which can be used when shutting down the console reader. The ConsoleReader cannot be used after calling this method.



setSttyCommand
public static void setSttyCommand(String cmd)(Code)
The command to use to set the terminal options. Defaults to "stty", or the value of the system property "jline.sttyCommand".



Methods inherited from jline.Terminal
public void afterReadLine(ConsoleReader reader, String prompt, Character mask)(Code)(Java Doc)
public void beforeReadLine(ConsoleReader reader, String prompt, Character mask)(Code)(Java Doc)
abstract public void disableEcho()(Code)(Java Doc)
abstract public void enableEcho()(Code)(Java Doc)
public InputStream getDefaultBindings()(Code)(Java Doc)
abstract public boolean getEcho()(Code)(Java Doc)
public static Terminal getTerminal()(Code)(Java Doc)
abstract public int getTerminalHeight()(Code)(Java Doc)
abstract public int getTerminalWidth()(Code)(Java Doc)
abstract public void initializeTerminal() throws Exception(Code)(Java Doc)
public boolean isANSISupported()(Code)(Java Doc)
abstract public boolean isEchoEnabled()(Code)(Java Doc)
abstract public boolean isSupported()(Code)(Java Doc)
public int readCharacter(InputStream in) throws IOException(Code)(Java Doc)
public int readVirtualKey(InputStream in) throws IOException(Code)(Java Doc)
public static void resetTerminal()(Code)(Java Doc)
public static synchronized Terminal setupTerminal()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.