Android Utililty Methods String to File Write

List of utility methods to do String to File Write

Description

The list of methods to do String to File Write are organized into topic(s).

Method

voidappendTextToFile(String file, String text)
Simple method to append text to a file
try {
    PrintWriter out = new PrintWriter(new BufferedWriter(
            new FileWriter(file, true)));
    out.print(text);
    out.close();
} catch (IOException e) {
    e.printStackTrace();
voidwriteFile(List input, String inputFileName)
write File
FileOutputStream inputfos = new FileOutputStream(inputFileName);
for (String line : input) {
    inputfos.write(line.getBytes("UTF-8"));
    inputfos.write('\n');
inputfos.close();