Package org.jline.utils
Class NonBlocking.NonBlockingReaderInputStream
java.lang.Object
java.io.InputStream
org.jline.utils.NonBlockingInputStream
org.jline.utils.NonBlocking.NonBlockingReaderInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
NonBlocking
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferprivate final CharBufferprivate final CharsetEncoderprivate final NonBlockingReaderFields inherited from class org.jline.utils.NonBlockingInputStream
closed, EOF, READ_EXPIRED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNonBlockingReaderInputStream(NonBlockingReader reader, Charset charset) -
Method Summary
Methods inherited from class org.jline.utils.NonBlockingInputStream
checkClosed, peek, read, read, read, readBuffered, readBuffered, readBuffered, shutdownMethods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
reader
-
encoder
-
bytes
-
chars
-
-
Constructor Details
-
NonBlockingReaderInputStream
-
-
Method Details
-
available
public int available()- Overrides:
availablein classInputStream
-
close
Description copied from class:NonBlockingInputStreamCloses this input stream and marks it as closed.Subsequent read operations behavior depends on the
PROP_CLOSE_MODEsetting:"strict"- ThrowClosedException"warn"- Log a warning but continue (default in JLine 3.x)"lenient"- Silently allow access
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classNonBlockingInputStream- Throws:
IOException- if an I/O error occurs
-
read
- Specified by:
readin classNonBlockingInputStream- Throws:
IOException
-