Penso di esserci riuscito...ho implementato una funzione di questo tipo:
codice:
public void GeneraFile(String char_speciale, String char_sostituto, String url_scheletro_file, String url_nuovo_file){
try{
BufferedReader rdr = new BufferedReader(new InputStreamReader(new FileInputStream(url_scheletro_file)));
BufferedWriter wrt = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(url_nuovo_file)));
String line=rdr.readLine();
while(line!= null){
line=line.replaceAll(char_speciale, char_sostituto);
wrt.append(line);
wrt.newLine();
line = rdr.readLine();
}
wrt.close();
}catch(Exception e){
e.printStackTrace();
}
}
Dovrebbe funzionare correttamente.