Package com.jalios.io
Class StreamGobbler
java.lang.Object
com.jalios.io.StreamGobbler
- All Implemented Interfaces:
Runnable
Class required for process execution to prevent process hang
if out/err of program is not read in a seperated thread.
http://www.velocityreviews.com/forums/t130884-process-runtimeexec-causes-subprocess-hang.html
- Since:
- jcms-6.1.2
-
Constructor Summary
ConstructorsConstructorDescriptionStreamGobbler(String name, InputStream in) Constructs a new StreamGobbler.StreamGobbler(String name, InputStream in, OutputStream out) Constructs a new StreamGobbler which dump the input stream in an OuputStream.StreamGobbler(String name, InputStream in, StringBuilder sb) Constructs a new StreamGobbler which dump the input stream to a StringBuilder -
Method Summary
-
Constructor Details
-
StreamGobbler
Constructs a new StreamGobbler.- Parameters:
name- the name (for the thread)in- the input stream
-
StreamGobbler
Constructs a new StreamGobbler which dump the input stream to a StringBuilder- Parameters:
name- the name (for the thread)in- the input streamsb- the StringBuilder
-
StreamGobbler
Constructs a new StreamGobbler which dump the input stream in an OuputStream.- Parameters:
name- the name (for the thread)in- the input streamout- the OutputStream
-
-
Method Details