com.mhavila.cookbook.properties
Class RecipeProperties

java.lang.Object
  extended by com.mhavila.cookbook.properties.RecipeProperties

public class RecipeProperties
extends Object

Receita:
Localizar e ler um arquivo de propriedades e obter uma propriedade.
Exemplo de código:
String arquivo = "arquivo.properties";
InputStream in = EstaClasse.getClassResource(EstaClasse.class, arquivo);
Properties props = new Properties();
props.load(in);
in.close();
String nome = "nome.da.propriedade";
String valor = props.getProperty(nome);

Referências:

Author:
Márcio d'Ávila (www.mhavila.com)
See Also:
Properties, Properties.load(java.io.InputStream)

Constructor Summary
RecipeProperties()
           
 
Method Summary
static Properties loadProperties(InputStream in)
           
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecipeProperties

public RecipeProperties()
Method Detail

loadProperties

public static Properties loadProperties(InputStream in)

main

public static void main(String[] args)