Class NonBlockingPumpInputStream
java.lang.Object
java.io.InputStream
org.jline.utils.NonBlockingInputStream
org.jline.utils.NonBlockingPumpInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
Fields inherited from class NonBlockingInputStream
EOF, READ_EXPIRED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidvoidclose()Closes this input stream and marks it as closed.intread(long timeout, boolean isPeek) intreadBuffered(byte[] b, int off, int len, long timeout) voidsetIoException(IOException exception) Methods inherited from class NonBlockingInputStream
checkClosed, peek, read, read, read, readBuffered, readBuffered, shutdownMethods inherited from class InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
NonBlockingPumpInputStream
public NonBlockingPumpInputStream() -
NonBlockingPumpInputStream
public NonBlockingPumpInputStream(int bufferSize)
-
-
Method Details
-
getOutputStream
-
available
public int available()- Overrides:
availablein classInputStream
-
read
- Specified by:
readin classNonBlockingInputStream- Throws:
IOException
-
readBuffered
- Overrides:
readBufferedin classNonBlockingInputStream- Throws:
IOException
-
setIoException
-
checkIoException
- Throws:
IOException
-
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
-