Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE
Default buffer size.
|
protected static long |
WAIT_DELAY
The number of milliseconds to wait before writing
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
StreamCopyThread(String name,
InputStream in,
OutputStream out,
boolean pInput)
Create a thread to copy bytes fro one strea to the other
|
StreamCopyThread(ThreadGroup group,
String name,
InputStream in,
OutputStream out,
boolean pInput)
Create a thread to copy bytes fro one stream to the other
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
complete()
This method is called when the copying of bytes is done and notifies a
waiting thread
|
boolean |
finished()
Returns whether this thread has finished copying bytes
|
long |
getCount() |
void |
run() |
void |
waitFor()
By calling this method the calling thread will wait until this thread is
finished copying bytes
|
activeCount, checkAccess, clone, 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, yieldprotected static final long WAIT_DELAY
public static final int BUFFER_SIZE
public StreamCopyThread(String name, InputStream in, OutputStream out, boolean pInput)
name - the name of the new threadin - the stream from which to pipe the dataout - the stream to pipe the data topInput - This thread writes to the external processpublic StreamCopyThread(ThreadGroup group, String name, InputStream in, OutputStream out, boolean pInput)
group - ThreadGroup where this thread belongs toname - the name of the new threadin - the stream from which to pipe the dataout - the stream to pipe the data tobSize - the size of the buffer in which data is pipedpInput - This thread writes to the external processpublic void run()
run in interface Runnablerun in class ThreadRunnable.run()public boolean finished()
true if finished and false otherwisepublic long getCount()
public void waitFor()
protected void complete()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}