Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. private String leArquivo(String nome) {
  2. String linha = "";
  3. StringBuilder conteudoArquivo = new StringBuilder();
  4.  
  5. try {
  6. FileReader arq = new FileReader(nome);
  7. BufferedReader lerArq = new BufferedReader(arq);
  8.  
  9. while (linha != null) {
  10. linha = lerArq.readLine();
  11. conteudoArquivo.append(linha);
  12. }
  13.  
  14. arq.close();
  15.  
  16. } catch (IOException e) {
  17. UtExceptionMaestro.logarException(Thread.currentThread(), e, LevelLog.ERROR);
  18. }
  19. return conteudoArquivo.toString();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement