Class ShellConsole
java.lang.Object
org.mozilla.javascript.tools.shell.ShellConsole
-
Method Summary
Modifier and TypeMethodDescriptionabstract voidflush()Flushes the console's outputstatic ShellConsolegetConsole(InputStream in, PrintStream ps, Charset cs) static ShellConsolegetConsole(Scriptable scope, Charset cs) Provides a specializedShellConsoleto handle line editing, history and completion.abstract InputStreamgetIn()Returns the underlyingInputStreamabstract voidPrints a single string to the consoleabstract voidprintln()Prints the newline character-sequence to the consoleabstract voidPrints a string and the newline character-sequence to the consoleabstract StringreadLine()Reads a single line from the consoleabstract StringReads a single line from the console and sets the console's prompt toprompt
-
Method Details
-
getIn
Returns the underlyingInputStream -
readLine
Reads a single line from the console- Throws:
IOException
-
readLine
Reads a single line from the console and sets the console's prompt toprompt- Throws:
IOException
-
flush
Flushes the console's output- Throws:
IOException
-
print
Prints a single string to the console- Throws:
IOException
-
println
Prints the newline character-sequence to the console- Throws:
IOException
-
println
Prints a string and the newline character-sequence to the console- Throws:
IOException
-
getConsole
-
getConsole
Provides a specializedShellConsoleto handle line editing, history and completion. Relies on the JLine library (see invalid input: '<'http://jline.sourceforge.net>).
-