Don't use FileReader or FileWriter
FileReader and FileWriter are built-in APIs for writing text to the local filesystem. They're extremely convenient and concise: FileReader reader = new FileReader(file); Sadly, this code is broken, and there's no way to use FileReader or FileWriter in a way that isn't broken. When these classes were designed in 1997,…