DataOutputStream Class
Package: java.io
The DataOutputStream class is the main class you’ll work with for writing data to binary files. This class builds on the BufferedOutputStream class by adding the ability to write primitive data types. The BufferedOutputStream class builds on the FileOutputStream class by adding buffered output for the sake of efficiency. And the FileOutputStream class provides the basic capabilities of writing characters to an output stream.
Constructor
|
Constructor |
Description |
|
|
Creates a data output stream for the specified output stream. |
Methods
|
Method |
Description |
|
|
Closes the file. |
|
|
Writes the contents of the buffer to the hard drive. |
|
|
Returns the number of bytes written to the file. |
|
|
Writes a |
|
|
Writes a |
|
|
Writes a |
|
|
Writes a |
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access