|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgate.util.ProcessManager.StreamGobbler
private class ProcessManager.StreamGobbler
Thread body that takes a stream and either consumes it silently or echoes it to another stream.
| Field Summary | |
|---|---|
private byte[] |
buf
Buffer used for reading and writing. |
private boolean |
done
Are we finished? |
private Exception |
exception
If an exception is thrown during gobbling, it is stored here. |
private InputStream |
inputStream
The input stream to gobble. |
private OutputStream |
outputStream
The output stream to echo to. |
| Constructor Summary | |
|---|---|
private |
ProcessManager.StreamGobbler()
|
| Method Summary | |
|---|---|
(package private) Exception |
getException()
Return the last exception thrown. |
(package private) boolean |
hasException()
Has an exception been thrown since getException() was last
called? |
(package private) boolean |
isDone()
|
(package private) void |
reset()
Reset state. |
void |
run()
Main body of the thread. |
(package private) void |
setInputStream(InputStream is)
Set the stream to gobble. |
(package private) void |
setOutputStream(OutputStream os)
Set the output stream to redirect output to. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private InputStream inputStream
private OutputStream outputStream
private byte[] buf
private boolean done
private Exception exception
| Constructor Detail |
|---|
private ProcessManager.StreamGobbler()
| Method Detail |
|---|
void setInputStream(InputStream is)
void setOutputStream(OutputStream os)
null indicates that we should discard the output without
echoing it.
boolean hasException()
getException() was last
called?
Exception getException()
null.
boolean isDone()
void reset()
public void run()
run in interface Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||