本帖最后由 敷衍ゝ微笑掩盖 于 2014-7-1 08:25 编辑
------- <a target="blank">android培训</a>、<a target="blank">java培训</a>、期待与您交流! ----------
PipeOutStream 读数据
PipeInputStream 写数据
① 连接两个管道
PipeOutStream out = new PipeOutStream();
PipeInputStream in = new PipeInputStream();
in.connect(out)
② 为两个管道开启进程。
Read r = new read(in);
Write w = new Write(out)
new thead(r).start();
new thread(w).start(); |
|