Last Updated: June 6, 2026
In the previous chapter, raw bytes were read and written with FileInputStream and FileOutputStream. That works fine for binary files (images, PDFs, ZIPs), but it falls apart for human-readable text in any language other than plain English. This chapter is about FileReader and FileWriter, the character-stream counterparts in java.io. They sit on top of the byte streams and handle one extra job: converting between bytes on disk and char values in memory using a character set.