public abstract class ShellConsole
extends java.lang.Object
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()
InputStream
public abstract java.lang.String readLine() throws java.io.IOException
java.io.IOException
public abstract java.lang.String readLine(java.lang.String prompt) throws java.io.IOException
prompt
java.io.IOException
public abstract void flush() throws java.io.IOException
java.io.IOException
public abstract void print(java.lang.String s) throws java.io.IOException
java.io.IOException
public abstract void println() throws java.io.IOException
java.io.IOException
public abstract void println(java.lang.String s) throws java.io.IOException
java.io.IOException
public 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
Copyright © 2010 - 2020 Adobe. All Rights Reserved