Package br.com.neto.main

Source Code of br.com.neto.main.LerArquivoTxt

package br.com.neto.main;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import br.com.neto.util.Constantes;

public class LerArquivoTxt {
 
  @SuppressWarnings("static-access")
  public static void main(String[] args) throws IOException {
   
    Constantes c = Constantes.getInstance();
    File arquivo = new File(c.FILE_DIRETORIO + c.SLASH + "album.txt");
   
    InputStream is = new FileInputStream(arquivo);
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
   
    String line = null;
    while((line = br.readLine()) != null){
      System.out.println(line);
    }
   
    br.close();
  }
}
TOP

Related Classes of br.com.neto.main.LerArquivoTxt

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.