|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.io.StreamGobbler
public class StreamGobbler
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
Constructor Summary | |
---|---|
StreamGobbler(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 | |
---|---|
String |
getString()
|
void |
run()
|
void |
start()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamGobbler(String name, InputStream in)
name
- the name (for the thread)in
- the input streampublic StreamGobbler(String name, InputStream in, StringBuilder sb)
name
- the name (for the thread)in
- the input streamsb
- the StringBuilderpublic StreamGobbler(String name, InputStream in, OutputStream out)
name
- the name (for the thread)in
- the input streamout
- the OutputStreamMethod Detail |
---|
public void start()
public void run()
run
in interface Runnable
public String getString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |