cx.ath.matthew.io
public class InOutCopier extends Thread
InputStream a = getInputStream(); OutputStream b = getOutputStream(); InOutCopier copier = new InOutCopier(a, b); copier.start(); <do stuff that writes to the inputstream>
| Constructor Summary | |
|---|---|
| InOutCopier(InputStream is, OutputStream os)
Create a copier from an inputstream to an outputstream | |
| Method Summary | |
|---|---|
| void | close()
Force close the stream without waiting for EOF on the source |
| void | flush()
Flush the outputstream |
| void | run()
Copies from the inputstream to the outputstream
until EOF on the inputstream or explicitly closed |
| void | start() Start the thread and wait to make sure its really started |
Parameters: is The stream to copy from os the stream to copy to
See Also: close