FileOutputStream Class
Package: java.io
The FileOutputStream class connects an output stream to a File object and provides the basic ability to write binary data to the file.
In most cases, you won’t use methods of this class directly. Instead, you’ll use this class to connect to Buffered OutputStream, which extends the FileOutputStream class by providing buffering for more efficient output. Then, you’ll connect the BufferedOutputStream object to a Data OutputStream object, which has the ability to write primitive data types (such as integers and doubles) directly to the output file. As a result, this section shows only the constructor for the FileOutputStream class and not its methods. For more information, see DataOutputStream Class.
Constructors
|
Constructor |
Description |
|
|
Creates a file writer from the file. It throws |
|
|
Creates a file writer from the file. It throws |
|
|
Creates a file writer from the specified pathname. It throws |
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