|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
net.sf.taverna.t2.lang.io.StreamDevourer
public class StreamDevourer
Devours an input stream and allows the contents to be read as a String once the stream has completed.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
StreamDevourer(java.io.InputStream is)
Create the StreamDevourer and point it at an InputStream to consume |
|
| Method Summary | |
|---|---|
java.lang.String |
blockOnOutput()
Waits for the stream to close then returns the String representation of its contents (this is equivalent to doing a join then calling toString) |
void |
run()
When started this Thread will copy all data from the InputStream into a ByteArrayOutputStream via a BufferedReader. |
java.lang.String |
toString()
Returns the current value of the internal ByteArrayOutputStream |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StreamDevourer(java.io.InputStream is)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Threadpublic java.lang.String blockOnOutput()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||