Android Utililty Methods Text File Append

List of utility methods to do Text File Append

Description

The list of methods to do Text File Append are organized into topic(s).

Method

voidappendFile(File file, String content)
Reads some bytes from the file.
if (!file.exists()) {
    file.getParentFile().mkdirs();
FileWriter out = null;
try {
    out = new FileWriter(file, true);
    out.write(content);
} catch (IOException e) {
...
voidappendLineToFile(String textToWrite, String fileName)
append Line To File
String eol = System.getProperty("line.separator");
FileWriter out = new FileWriter(fileName, true);
BufferedWriter writer = new BufferedWriter(out);
writer.write(textToWrite + eol);
writer.close();
voidappendString(String filename, String content)
append String
try {
    FileWriter f = new FileWriter(filename, true);
    f.write(content);
    f.close();
} catch (Exception e) {
    throw new Error(e);
voidappendToFile(String sb, String directory, String fileName)
append To File
if (!directory.endsWith("/")) {
    directory = directory + "/";
File out = new File(directory + fileName);
try {
    Writer fw = new OutputStreamWriter(new FileOutputStream(out,
            true), "UTF-8");
    try {
...