<<< OutputStream hierarchy constructors | Index | DataOutputStream: opening binary file for appending >>> |
Construct java.io.BufferedOutputStream object
Assign it to OutputStream
Opening a file with a buffer:
FileOutputStream must be instantiated first, and the constructor requires a File object or a file name.
BufferedOutputSream object must be instantiated. The constructor requires the FileOutputStream object.
DataOutputStream object must be instantiated. Its constructor takes the BufferedOutputStream object.
DataOutputStream out = new DataOutputStream( new BufferedOutputStream( new FileOutputStream("books.bin")));
Note that DataOutputStream implements the DataOutput interface.
<<< OutputStream hierarchy constructors | Index | DataOutputStream: opening binary file for appending >>> |