In this case, the authors of the examples know that the size of the output is small ahead of schedule. You really only need a buffered version if you have βlargeβ amounts of data to write (which you usually don't know for absolute certainty ahead of time).
JavaDocs for BufferedOutputStream emphasizes this ...
Expensive interactions with the main input stream are minimized, since most (smaller) requests can be satisfied by accessing the buffer alone.
source share