public abstract class ShellConsole
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
ShellConsole() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
flush()
Flushes the console's output
|
static ShellConsole |
getConsole(java.io.InputStream in,
java.io.PrintStream ps,
java.nio.charset.Charset cs)
|
static ShellConsole |
getConsole(Scriptable scope,
java.nio.charset.Charset cs)
Provides a specialized
ShellConsole to handle line editing,
history and completion. |
abstract java.io.InputStream |
getIn()
Returns the underlying
InputStream |
abstract void |
print(java.lang.String s)
Prints a single string to the console
|
abstract void |
println()
Prints the newline character-sequence to the console
|
abstract void |
println(java.lang.String s)
Prints a string and the newline character-sequence to the console
|
abstract java.lang.String |
readLine()
Reads a single line from the console
|
abstract java.lang.String |
readLine(java.lang.String prompt)
Reads a single line from the console and sets the console's prompt to
prompt |
public abstract java.io.InputStream getIn()
InputStreampublic abstract java.lang.String readLine()
throws java.io.IOException
java.io.IOExceptionpublic abstract java.lang.String readLine(java.lang.String prompt)
throws java.io.IOException
promptjava.io.IOExceptionpublic abstract void flush()
throws java.io.IOException
java.io.IOExceptionpublic abstract void print(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic abstract void println()
throws java.io.IOException
java.io.IOExceptionpublic abstract void println(java.lang.String s)
throws java.io.IOException
java.io.IOExceptionpublic static ShellConsole getConsole(java.io.InputStream in, java.io.PrintStream ps, java.nio.charset.Charset cs)
public static ShellConsole getConsole(Scriptable scope, java.nio.charset.Charset cs)
ShellConsole to handle line editing,
history and completion. Relies on the JLine library (see