|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.googlepages.dronten.jripper.util.BaseThread
com.googlepages.dronten.jripper.util.StreamThread
public class StreamThread
Stream reader thread. For reading streams from process streams. A reader can also write data to another process.
| Nested Class Summary | |
|---|---|
static class |
StreamThread.ReadType
|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected java.io.BufferedInputStream |
aByteReader
|
protected java.io.BufferedOutputStream |
aByteWriter
|
protected java.io.BufferedReader |
aLineReader
|
StreamThread.ReadType |
aType
|
boolean |
aWrite
|
| Fields inherited from class com.googlepages.dronten.jripper.util.BaseThread |
|---|
aProgress, aRunning |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
StreamThread(Log log,
Progress progress,
StreamThread.ReadType readType,
boolean write)
|
|
| Method Summary | |
|---|---|
void |
close()
Close streams. |
void |
data(byte[] bytes,
int size)
Default action is to send bytes to process writer. |
void |
data(java.lang.String line)
Default action is to send bytes to process writer. |
StreamThread.ReadType |
getType()
|
boolean |
isWriting()
|
void |
run()
Run stream reader thread. |
void |
setByteReader(java.io.BufferedInputStream stream)
|
void |
setByteWriter(java.io.BufferedOutputStream stream)
|
void |
setLineReader(java.io.BufferedReader reader)
|
void |
write(byte[] bytes,
int size)
Write bytes to output process. |
| Methods inherited from class com.googlepages.dronten.jripper.util.BaseThread |
|---|
addLog, getLog, getTrackNum, hasFailed, setFailed, setLog, setTrackNum, stopLogging, stopRunning |
| 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, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public StreamThread.ReadType aType
public boolean aWrite
protected java.io.BufferedOutputStream aByteWriter
protected java.io.BufferedInputStream aByteReader
protected java.io.BufferedReader aLineReader
| Constructor Detail |
|---|
public StreamThread(Log log,
Progress progress,
StreamThread.ReadType readType,
boolean write)
log - readType - write - | Method Detail |
|---|
public void close()
close in class BaseThread
public void data(byte[] bytes,
int size)
throws java.lang.Exception
bytes - size -
java.lang.Exception
public void data(java.lang.String line)
throws java.lang.Exception
line -
java.lang.Exceptionpublic StreamThread.ReadType getType()
public boolean isWriting()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void setByteReader(java.io.BufferedInputStream stream)
stream - public void setByteWriter(java.io.BufferedOutputStream stream)
stream - public void setLineReader(java.io.BufferedReader reader)
reader -
public void write(byte[] bytes,
int size)
throws java.lang.Exception
bytes - size -
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||