It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center




已关闭8年。




Java中InputStream DataInputStreamBufferedInputStream的区别?

最佳答案

如果问题是:“这些类之间的区别是什么?”,这里是一个摘要,但请阅读javadoc以获得更多信息:

inputStream是从流(网络或文件)读取字节的基类。它提供了从流中读取字节并检测流结束的功能。

DataInputStream是一种InputStream,可以直接将数据作为原始数据类型读取。

BufferedInputStream是一种inputStream,它从流中读取数据并使用缓冲区来优化对数据的访问速度。基本上会提前读取数据,这会减少磁盘或网络访问。

关于java - Java中 `InputStream` `DataInputStream`和 `BufferedInputStream`的区别? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9805192/

10-11 20:18