Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从javadoc:
public int read(byte[] b) throws IOException
从此输入流中读取最多 b.length 个字节的数据到字节数组中。此方法会阻塞,直到某些输入可用。
“此方法阻塞直到某些输入可用?主线程阻塞?直到某些 InputStream 被传递到流中?它们是什么意思?
提前致谢。
这几乎意味着你的程序将暂停,直到你给它一些输入。