I was wondering what the exact difference is between Android's FileOutputStream and FileWriter class. When would it be most appropriate to use each one?
If I remember correctly, FileOutputStream is more general purpose - it can be used for binary data or text data. FileWriter is used for text only.
http://docs.oracle.com/javase/1.4.2/docs/api/java/io/FileWriter.html
FileWriter is meant for writing streams of characters. For writing streams of raw bytes, consider using a FileOutputStream.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With