|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.eclipse.jgit.util.io.StreamCopyThread
public class StreamCopyThread
Thread to copy from an input stream to an output stream.
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 | |
---|---|
StreamCopyThread(java.io.InputStream i,
java.io.OutputStream o)
Create a thread to copy data from an input stream to an output stream. |
Method Summary | |
---|---|
void |
flush()
Request the thread to flush the output stream as soon as possible. |
void |
halt()
Request that the thread terminate, and wait for it. |
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
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, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StreamCopyThread(java.io.InputStream i, java.io.OutputStream o)
i
- stream to copy from. The thread terminates when this stream
reaches EOF. The thread closes this stream before it exits.o
- stream to copy into. The destination stream is automatically
closed when the thread terminates.Method Detail |
---|
public void flush()
This is an asynchronous request to the thread. The actual flush will happen at some future point in time, when the thread wakes up to process the request.
public void halt() throws java.lang.InterruptedException
This method signals to the copy thread that it should stop as soon as there is no more IO occurring.
java.lang.InterruptedException
- the calling thread was interrupted.public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |