Last Updated: June 6, 2026
BufferedReader and BufferedWriter are wrappers from java.io that sit on top of an existing reader or writer and add an in-memory buffer. The buffer turns many tiny reads or writes into a small number of larger ones, which is the single biggest performance win in classic Java file I/O. This lesson covers the decorator pattern that makes wrapping work, why unbuffered I/O is slow, the BufferedReader and BufferedWriter APIs, the canonical line-by-line reading pattern, the lines() stream, and the pitfalls that bite beginners.