标题: 面试题:DataoutputStream BufferedoutputStream区别? [打印本页] 作者: 沿途的记忆 时间: 2014-6-25 23:33 标题: 面试题:DataoutputStream BufferedoutputStream区别? 面试的时候问道:DataoutputStream BufferedoutputStream区别?其实自己就回答了 数据和缓冲的区别,感觉不是很全面,有人有更全面的吗?作者: 崔湖尧 时间: 2014-6-25 23:44
DataOutputStream: A data output stream lets an application write primitive Java data types to an output stream in a portable way. An application can then use a data input stream to read the data back in.
这个类的方法大多是writeFloat, writeDouble, writeBoolean等等, 与DataInputStream一起使用可以把java的primitive 数据写入读出.
BufferedOutputStream: The class implements a buffered output stream. By setting up such an output stream, an application can write bytes to the underlying output stream without necessarily causing a call to the underlying
BufferedOutputStream有缓存读写的功能system for each byte written.