Package nl.knaw.dans.layerstore
Class ProcessInputStream
java.lang.Object
java.io.InputStream
nl.knaw.dans.layerstore.ProcessInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An InputStream that checks the status of a process after each read operation and throws an IOException if the process has terminated with a non-zero exit code.
-
Constructor Summary
ConstructorDescriptionProcessInputStream
(Process process) Creates a new ProcessInputStream that reads from the given process's input stream. -
Method Summary
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ProcessInputStream
Creates a new ProcessInputStream that reads from the given process's input stream.- Parameters:
process
- the process to read from
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-