Package org.zeroturnaround.exec.close
Class StandardProcessCloser
java.lang.Object
org.zeroturnaround.exec.close.StandardProcessCloser
- All Implemented Interfaces:
ProcessCloser
- Direct Known Subclasses:
TimeoutProcessCloser
Stops
ExecuteStreamHandler
from pumping the streams and closes them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
protected final ExecuteStreamHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static IOException
add
(IOException exception, IOException newException) void
Closes standard streams of a given sub process.private void
closeStreams
(Process process) Close the streams belonging to the given Process.
-
Field Details
-
log
private static final org.slf4j.Logger log -
streams
-
-
Constructor Details
-
StandardProcessCloser
-
-
Method Details
-
close
Description copied from interface:ProcessCloser
Closes standard streams of a given sub process.- Specified by:
close
in interfaceProcessCloser
- Parameters:
process
- sub process (notnull
).- Throws:
IOException
- if I/O errors occur while closing the underlying streamInterruptedException
- if underlying throws a InterruptedException
-
closeStreams
Close the streams belonging to the given Process.- Throws:
IOException
-
add
-