| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private volatile boolean | |
| private final OutputStream | |
| private final InputStream | |
| private final Object | writeLock
Lock held by flush to avoid interrupting a write. |
| Access | Constructor and Description |
|---|---|
| public | StreamCopyThread(InputStream
stream to copy from. The thread terminates when this stream
reaches EOF. The thread closes this stream before it exits. i, OutputStream stream to copy into. The destination stream is automatically
closed when the thread terminates. o)Create a thread to copy data from an input stream to an output stream. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | run()
Overrides java. Implements java. This method is run by the thread when it executes. |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| done | back to summary |
|---|---|
| private volatile boolean done | |
| dst | back to summary |
|---|---|
| private final OutputStream dst | |
| src | back to summary |
|---|---|
| private final InputStream src | |
| writeLock | back to summary |
|---|---|
| private final Object writeLock Lock held by flush to avoid interrupting a write. | |
| StreamCopyThread | back to summary |
|---|---|
| public StreamCopyThread(InputStream i, OutputStream o) Create a thread to copy data from an input stream to an output stream.
| |
| halt | back to summary |
|---|---|
| public void halt() throws InterruptedException Request that the thread terminate, and wait for it. This method signals to the copy thread that it should stop as soon as there is no more IO occurring.
| |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a
| |