DataOutputStream class and Buffere
What is the difference between the Doutputstream class?
DataOutputStream dataout=new DataOutputStream (new
FileOutputStream ("file"));
Bufferedoutputstream dataout1=new Bufferedoutputstream (new
FileOutputStream ("file"));
What is the difference between the DataOutputStream class and the Bufferedoutputstream class:
The Bufferedoutputstream class can create a buffer in memory that, when writing a file, can play a
Buffering effect. But DataOutputStream can act as a buffer like the Bufferedoutputstream class.
Use it? If there is a buffer, but the DataOutputStream class constructor, there is only one.
and the parameters of its constructor do not provide a parameter to set the cache size?
--> in common is that two classes are java.io.FilterOutputStream subclasses, but the two classes are different:
[U] [b] DATAOUTPUTSTREAM[/B][/U]
A data output stream lets an application write primitive Java data types to a output stream in a portable way. An application can then with a data input stream to read the data.
So most of the methods of this class are Writefloat, Writedouble, Writeboolean, and so on, which can be written to read from Java primitive data with DataInputStream.
[U] [b] BUFFEREDOUTPUTSTREAM[/B][/U]
The class implements a buffered output stream. By setting up such a output stream, an application can write bytes to the underlying output stream without necessarily CA Using a call to the underlying system for each byte written.
Bufferedoutputstream has cached read-write functionality, while DataOutputStream does not