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 |
Get Java For Dummies Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.