FileOutputStream vs. FileWriter
When we use Java to write something to a file, we can do it in the following two ways. One uses FileOutputStream, the other uses FileWriter. Using FileOutputStream: File fout = new File(file_location_string); FileOutputStream fos = new FileOutputStream(fout); BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); out.write("something");File fout = new File(file_location_string); FileOutputStream fos = new FileOutputStream(fout); BufferedWriter … Read more