Java BufferedOutputStream Class
Java BufferedOutputStream class is used for buffering an output stream. It internally uses buffer to store data. It adds more efficiency than to write data directly into a stream. So, it makes the performance fast.
For adding the buffer in an OutputStream, use the BufferedOutputStream class. Let's see the syntax for adding the buffer in an OutputStream:
Java BufferedOutputStream class declaration
Let's see the declaration for Java.io.BufferedOutputStream class:
Java BufferedOutputStream class constructors
Java BufferedOutputStream class methods
Example of BufferedOutputStream class:
In this example, we are writing the textual information in the BufferedOutputStream object which is connected to the FileOutputStream object. The flush() flushes the data of one stream and send it into another. It is required if you have connected the one stream with another.
Welcome to javaTpoint.