1
The path to the files are in a String array. Some files have accented name and are generating FileNotFoundException
/**
* Realiza leitura dos dados de um arquivo.
* @param s - string com endereco do diretorio do arquivo
*/
public void ler(String s) {
String dados = "";
String linha;
try {
FileReader f = new FileReader(s);
BufferedReader b = new BufferedReader(f);
while(b.ready()){
linha = b.readLine();
dados += linha;
}
this.dados = dados;
b.close();
f.close();
} catch (IOException e) {
MyIO.println("METODO LER() ====> " + e.toString());
} finally{
}
}
Example of file names:
/tmp/personagens/Cordé.txt
/tmp/personagens/Dormé.txt
/tmp/personagens/JabbaDesilijicTiure.txt
/tmp/personagens/JangoFett.txt
/tmp/personagens/JarJarBinks.txt
/tmp/personagens/PadméAmidala.txt
/tmp/personagens/RicOlié.txt