List of utility methods to do Text File Replace
void | replaceAFileText(String fileName, String word, String replaceWord) Replace a File text for a new one. String tempFileName = fileName + "_temp"; BufferedWriter writer = new BufferedWriter(new FileWriter( tempFileName)); BufferedReader reader = new BufferedReader(new FileReader(fileName)); String linha; while ((linha = reader.readLine()) != null) { if (linha.contains(word)) { linha = linha.replace(word, replaceWord); ... |