package br.dsc.upe.poli.util;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class LeituraArquivo {
	
	public LeituraArquivo(){
		
	}
	
	
	public StringBuffer getConteudo(String nome) throws IOException{
		Reader reader = new FileReader(nome);
		BufferedReader buffer = new BufferedReader(reader);
		String linha = buffer.readLine();
		StringBuffer strbuffer = new StringBuffer();
		while(linha!=null){
			strbuffer.append(linha+"\n");
			linha = buffer.readLine();
		}
		return strbuffer;
			
	}
	public static void main(String args[]){
		LeituraArquivo leituraArquivo = new LeituraArquivo();
		try {
			System.out.println(leituraArquivo.getConteudo("F:/jspTeste/atividades/atividade1.txt"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	

}
