Home Page
About Us


FileOutputStream is a Java class used to write bytes directly to a File or to a FileDescriptor.


Java built-in class that allows writing character files.



You need to create a fileoutputstream and decorates it with printstream or better filewriter with printwriter

from question  

Writing System.Out.Println into text file

Usually better than filewriter already suggested is to use fileoutputstream which also like filewriter has an append parameter in one of filewriter constructors and which unlike filewriter does not silently assume the default charset encoding slightly bad practice imo

from question  

Java I/O: How to append to an already existing text file

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

from question  

Android: Difference between FileOutputStream and FileWriter

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0