Class ShellConsole.ConsoleInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.htmlunit.corejs.javascript.tools.shell.ShellConsole.ConsoleInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- ShellConsole
private static class ShellConsole.ConsoleInputStream extends java.io.InputStream
JLine's ConsoleReaderInputStream is no longer public, therefore we need to use our own implementation
-
-
Constructor Summary
Constructors Constructor Description ConsoleInputStream(ShellConsole console, java.nio.charset.Charset cs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
ensureInput()
int
read()
int
read(byte[] b, int off, int len)
private int
readNextLine()
-
-
-
Field Detail
-
EMPTY
private static final byte[] EMPTY
-
console
private final ShellConsole console
-
cs
private final java.nio.charset.Charset cs
-
buffer
private byte[] buffer
-
cursor
private int cursor
-
atEOF
private boolean atEOF
-
-
Constructor Detail
-
ConsoleInputStream
public ConsoleInputStream(ShellConsole console, java.nio.charset.Charset cs)
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
ensureInput
private boolean ensureInput() throws java.io.IOException
- Throws:
java.io.IOException
-
readNextLine
private int readNextLine() throws java.io.IOException
- Throws:
java.io.IOException
-
-