Package org.jline.utils
Class NonBlockingPumpInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.jline.utils.NonBlockingInputStream
-
- org.jline.utils.NonBlockingPumpInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class NonBlockingPumpInputStream extends NonBlockingInputStream
-
-
Field Summary
-
Fields inherited from class org.jline.utils.NonBlockingInputStream
EOF, READ_EXPIRED
-
-
Constructor Summary
Constructors Constructor Description NonBlockingPumpInputStream()NonBlockingPumpInputStream(int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()protected voidcheckIoException()voidclose()Closes this input stream and marks it as closed.java.io.OutputStreamgetOutputStream()intread(long timeout, boolean isPeek)intreadBuffered(byte[] b, int off, int len, long timeout)voidsetIoException(java.io.IOException exception)-
Methods inherited from class org.jline.utils.NonBlockingInputStream
checkClosed, peek, read, read, read, readBuffered, readBuffered, shutdown
-
-
-
-
Method Detail
-
getOutputStream
public java.io.OutputStream getOutputStream()
-
available
public int available()
- Overrides:
availablein classjava.io.InputStream
-
read
public int read(long timeout, boolean isPeek) throws java.io.IOException- Specified by:
readin classNonBlockingInputStream- Throws:
java.io.IOException
-
readBuffered
public int readBuffered(byte[] b, int off, int len, long timeout) throws java.io.IOException- Overrides:
readBufferedin classNonBlockingInputStream- Throws:
java.io.IOException
-
setIoException
public void setIoException(java.io.IOException exception)
-
checkIoException
protected void checkIoException() throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionDescription 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 interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classNonBlockingInputStream- Throws:
java.io.IOException- if an I/O error occurs
-
-