fangnoodles 发表于 2013-02-26 20:15

<Java 核心技术 卷2 > 中的一句话的如何理解

Both the read and write methods block until the bytes are actually read or written. This means that if the stream cannot immediately be accessed (usually because of a busy network connection), the current thread blocks. This gives other threads the chance to do useful work while the method is waiting for the stream to again become available.


上面这段文字是摘自:

<Java 核心技术 卷2 > 第8版, 第一章 Streams and Files 中的.

请问, 黑体的这句话如何理解? 它体现了 Java流技术的哪些特性?

pkwindows 发表于 2013-03-08 18:34

感觉 应该是    读写方法在bytes流没有真正读取之前一直是阻塞的。 感觉应该有java 线程调度的让步 和 线程阻塞 。

craaazy123 发表于 2013-03-16 15:53

write和read会因为没有读到字节流而阻塞   线程阻塞
页: [1]
查看完整版本: <Java 核心技术 卷2 > 中的一句话的如何理解