Package com.jalios.io
Class StreamGobbler
- java.lang.Object
 - 
- com.jalios.io.StreamGobbler
 
 
- 
- All Implemented Interfaces:
 java.lang.Runnable
public class StreamGobbler extends java.lang.Object implements java.lang.RunnableClass 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
Constructors Constructor Description StreamGobbler(java.lang.String name, java.io.InputStream in)Constructs a new StreamGobbler.StreamGobbler(java.lang.String name, java.io.InputStream in, java.io.OutputStream out)Constructs a new StreamGobbler which dump the input stream in an OuputStream.StreamGobbler(java.lang.String name, java.io.InputStream in, java.lang.StringBuilder sb)Constructs a new StreamGobbler which dump the input stream to a StringBuilder 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetString()voidrun()voidstart() 
 - 
 
- 
- 
Constructor Detail
- 
StreamGobbler
public StreamGobbler(java.lang.String name, java.io.InputStream in)Constructs a new StreamGobbler.- Parameters:
 name- the name (for the thread)in- the input stream
 
- 
StreamGobbler
public StreamGobbler(java.lang.String name, java.io.InputStream in, java.lang.StringBuilder sb)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
public StreamGobbler(java.lang.String name, java.io.InputStream in, java.io.OutputStream out)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
 
 - 
 
 -