Subversion Repositories Integrator Subversion

Rev

Blame | Last modification | View Log | Download | RSS feed

package br.edu.cesmac.sic.core.domain.util;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
       
        private Properties property;
       
        public PropertiesUtil (String arquivo) throws FileNotFoundException, IOException {
                criarProperty(arquivo);
        }
       
        public String retornarPropriedadeDoArquivo(String propriedade) throws IOException {
                return  property.getProperty(propriedade);
        }
       
        private void criarProperty(String arquivo) throws FileNotFoundException, IOException {
                property = new Properties();
                InputStream input = getClass().getResourceAsStream(arquivo);
                property.load(input);
        }
       
}