流写入内存 怎样读取数据,该怎么解决

流写入内存 怎样读取数据流写入内存PipedInputStreamisnewPipedInputStream()PipedOutputStreamosnewPi

流写入内存 怎样读取数据
流写入内存

PipedInputStream   is   =   new   PipedInputStream();
PipedOutputStream   os   =   new   PipedOutputStream(is);
os.write(doc.toString().getBytes());

我怎样在读取呢 

谢谢

[解决办法]
你使用多线程???为什么要用管道?

如果非要用管道,既然你知道用PipedOutputStream写,为什么不知道用PipedInputStream 读?
[解决办法]
学一招了