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.Loggerprotected final ExecuteStreamHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static IOExceptionadd(IOException exception, IOException newException) voidCloses standard streams of a given sub process.private voidcloseStreams(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:ProcessCloserCloses standard streams of a given sub process.- Specified by:
closein 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
-