本帖最后由 淡淡柠檬茶 于 2014-6-18 20:20 编辑
有点木,这个getBytes()的操作那里讲过????
class Write implements Runnable
{
private PipedOutputStream out;
Write(PipedOutputStream out)
{
this.out = out;
}
public void run()
{
try
{
System.out.println("开始输入数据等待6秒");
Thread.sleep(6000);
out.write("Piped".getBytes());//字节流??????
out.close();
}
catch (Exception e)
{
throw new RuntimeException("管道流输出失败");
}
}
} |