| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | Returns: -1 on eof, -2 if the timeout expired with no available input or the character that was read (without consuming it).The amount of time to wait, 0 == forever timeout)Peeks to see if there is a byte waiting in the input stream without actually consuming the byte. |
| public int | |
| public int | Returns: The character read, -1 if EOF is reached, or -2 if the read timed out.The amount of time to wait for the character timeout)Attempts to read a character from the input stream for a specific period of time. |
| public int | read(char[]
the buffer b, int the offset in the buffer off, int the maximum number of chars to read len)Implements abstract java. This version of read() is very specific to jline's purposes, it will always always return a single byte at a time, rather than filling the entire buffer. |
| protected abstract int | Returns: The character read, -1 if EOF is reached, or -2 if the read timed out.The amount of time to wait for the character timeout, boolean trueif the character read must not be consumedAttempts to read a character from the input stream for a specific period of time. |
| public int | |
| public int | |
| public abstract int | |
| public void |
| EOF | back to summary |
|---|---|
| public static final int EOF | |
| READ_EXPIRED | back to summary |
|---|---|
| public static final int READ_EXPIRED | |
| NonBlockingReader | back to summary |
|---|---|
| public NonBlockingReader() | |
| available | back to summary |
|---|---|
| public int available() | |
| peek | back to summary |
|---|---|
| public int peek(long timeout) throws IOException Peeks to see if there is a byte waiting in the input stream without actually consuming the byte.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Doc from java. Reads a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached. Subclasses that intend to support efficient single-character input should override this method.
| |
| read | back to summary |
|---|---|
| public int read(long timeout) throws IOException Attempts to read a character from the input stream for a specific period of time.
| |
| read | back to summary |
|---|---|
| public int read(char[] b, int off, int len) throws IOException Implements abstract java. This version of read() is very specific to jline's purposes, it will always always return a single byte at a time, rather than filling the entire buffer.
| |
| read | back to summary |
|---|---|
| protected abstract int read(long timeout, boolean isPeek) throws IOException Attempts to read a character from the input stream for a specific period of time.
| |
| readBuffered | back to summary |
|---|---|
| public int readBuffered(char[] b) throws IOException | |
| readBuffered | back to summary |
|---|---|
| public int readBuffered(char[] b, long timeout) throws IOException | |
| readBuffered | back to summary |
|---|---|
| public abstract int readBuffered(char[] b, int off, int len, long timeout) throws IOException | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Shuts down the thread that is handling blocking I/O. Note that if the thread is currently blocked waiting for I/O it will not actually shut down until the I/O is received. | |