Android Utililty Methods Text File Replace

List of utility methods to do Text File Replace


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


voidreplaceAFileText(String fileName, String word, String replaceWord)
Replace a File text for a new one.
String tempFileName = fileName + "_temp";
BufferedWriter writer = new BufferedWriter(new FileWriter(
BufferedReader reader = new BufferedReader(new FileReader(fileName));
String linha;
while ((linha = reader.readLine()) != null) {
    if (linha.contains(word)) {
        linha = linha.replace(word, replaceWord);