Java's advantages and principles of the stream buffer

It works without a buffer stream:

It reads a byte / character, specify the path to the user to write out and read a write a, so slow.

Works buffered streams:

Read a byte / character, to not output, and so gather the maximum capacity of the buffer write once out, thereby improving the working efficiency

Advantages: reducing the number of disk reads, reduce the loss of the hard disk.

Guess you like

Origin www.cnblogs.com/Yanss/p/11712098.html