public abstract class ShellConsole extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ShellConsole() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
flush()
Flushes the console's output
|
static ShellConsole |
getConsole(InputStream in,
PrintStream ps,
Charset cs)
|
static ShellConsole |
getConsole(Scriptable scope,
Charset cs)
Provides a specialized
ShellConsole to handle line editing, history and completion. |
abstract InputStream |
getIn()
Returns the underlying
InputStream |
abstract void |
print(String s)
Prints a single string to the console
|
abstract void |
println()
Prints the newline character-sequence to the console
|
abstract void |
println(String s)
Prints a string and the newline character-sequence to the console
|
abstract String |
readLine()
Reads a single line from the console
|
abstract String |
readLine(String prompt)
Reads a single line from the console and sets the console's prompt to
prompt |
public abstract InputStream getIn()
InputStreampublic abstract String readLine() throws IOException
IOExceptionpublic abstract String readLine(String prompt) throws IOException
promptIOExceptionpublic abstract void flush()
throws IOException
IOExceptionpublic abstract void print(String s) throws IOException
IOExceptionpublic abstract void println()
throws IOException
IOExceptionpublic abstract void println(String s) throws IOException
IOExceptionpublic static ShellConsole getConsole(InputStream in, PrintStream ps, Charset cs)
public static ShellConsole getConsole(Scriptable scope, Charset cs)
ShellConsole to handle line editing, history and completion.
Relies on the JLine library (see http://jline.sourceforge.net).Copyright © 2023 HtmlUnit. All rights reserved.