- java.lang.Object
-
- java.io.InputStream
-
- org.jline.utils.NonBlockingInputStream
-
- org.jline.utils.NonBlockingPumpInputStream
-
- All Implemented Interfaces:
Closeable
,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 int
available()
protected void
checkIoException()
void
close()
OutputStream
getOutputStream()
int
read(long timeout, boolean isPeek)
int
readBuffered(byte[] b)
void
setIoException(IOException exception)
-
Methods inherited from class org.jline.utils.NonBlockingInputStream
peek, read, read, read, shutdown
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Method Detail
-
getOutputStream
public OutputStream getOutputStream()
-
available
public int available()
- Overrides:
available
in classInputStream
-
read
public int read(long timeout, boolean isPeek) throws IOException
- Specified by:
read
in classNonBlockingInputStream
- Throws:
IOException
-
readBuffered
public int readBuffered(byte[] b) throws IOException
- Overrides:
readBuffered
in classNonBlockingInputStream
- Throws:
IOException
-
setIoException
public void setIoException(IOException exception)
-
checkIoException
protected void checkIoException() throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
-