BufferedOutputStream is a class which takes an output stream and
buffers the writes to that stream. In this way, costly interaction
with the original output stream can be minimized by writing buffered amounts
of data infrequently. The drawback is that extra space is required to hold
the buffer and copying takes place when writing that buffer.