Class ShellConsole
- java.lang.Object
- 
- org.mozilla.javascript.tools.shell.ShellConsole
 
- 
 public abstract class ShellConsole extends java.lang.Object
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedShellConsole()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidflush()Flushes the console's outputstatic ShellConsolegetConsole(java.io.InputStream in, java.io.PrintStream ps, java.nio.charset.Charset cs)static ShellConsolegetConsole(Scriptable scope, java.nio.charset.Charset cs)Provides a specializedShellConsoleto handle line editing, history and completion.abstract java.io.InputStreamgetIn()Returns the underlyingInputStreamabstract voidprint(java.lang.String s)Prints a single string to the consoleabstract voidprintln()Prints the newline character-sequence to the consoleabstract voidprintln(java.lang.String s)Prints a string and the newline character-sequence to the consoleabstract java.lang.StringreadLine()Reads a single line from the consoleabstract java.lang.StringreadLine(java.lang.String prompt)Reads a single line from the console and sets the console's prompt toprompt
 
- 
- 
- 
Method Detail- 
getInpublic abstract java.io.InputStream getIn() Returns the underlyingInputStream
 - 
readLinepublic abstract java.lang.String readLine() throws java.io.IOExceptionReads a single line from the console- Throws:
- java.io.IOException
 
 - 
readLinepublic abstract java.lang.String readLine(java.lang.String prompt) throws java.io.IOExceptionReads a single line from the console and sets the console's prompt toprompt- Throws:
- java.io.IOException
 
 - 
flushpublic abstract void flush() throws java.io.IOExceptionFlushes the console's output- Throws:
- java.io.IOException
 
 - 
printpublic abstract void print(java.lang.String s) throws java.io.IOExceptionPrints a single string to the console- Throws:
- java.io.IOException
 
 - 
printlnpublic abstract void println() throws java.io.IOExceptionPrints the newline character-sequence to the console- Throws:
- java.io.IOException
 
 - 
printlnpublic abstract void println(java.lang.String s) throws java.io.IOExceptionPrints a string and the newline character-sequence to the console- Throws:
- java.io.IOException
 
 - 
getConsolepublic static ShellConsole getConsole(java.io.InputStream in, java.io.PrintStream ps, java.nio.charset.Charset cs) 
 - 
getConsolepublic static ShellConsole getConsole(Scriptable scope, java.nio.charset.Charset cs) Provides a specializedShellConsoleto handle line editing, history and completion. Relies on the JLine library (see http://jline.sourceforge.net).
 
- 
 
-