org.hyperic.sigar.util
Class Getline
java.lang.Object
org.hyperic.sigar.util.Getline
public class Getline
- extends java.lang.Object
This class provides Emacs style key bindings, history and tab completion
for command shell applications.
This class is a Java interface to the getline.c package:
Copyright (C) 1991, 1992 by Chris Thewalt (thewalt@ce.berkeley.edu)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Getline
public Getline()
Getline
public Getline(java.lang.String prompt)
setCompleter
public static void setCompleter(GetlineCompleter completer)
redraw
public void redraw()
reset
public void reset()
isTTY
public static boolean isTTY()
getLine
public java.lang.String getLine()
throws java.io.IOException,
java.io.EOFException
- Throws:
java.io.IOException
java.io.EOFException
getLine
public java.lang.String getLine(java.lang.String prompt)
throws java.io.IOException,
java.io.EOFException
- Throws:
java.io.IOException
java.io.EOFException
getLine
public java.lang.String getLine(java.lang.String prompt,
boolean addToHistory)
throws java.io.IOException,
java.io.EOFException
- Throws:
java.io.IOException
java.io.EOFException
initHistoryFile
public void initHistoryFile(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
addToHistory
public void addToHistory(java.lang.String line)
Copyright ? 2004-2009 Hyperic. All Rights Reserved.