View Javadoc
1   /**
2    * 
3    */
4   package de.japrost.excerpt;
5   
6   import java.io.File;
7   import java.io.FileInputStream;
8   import java.io.FileNotFoundException;
9   import java.io.IOException;
10  import java.io.InputStreamReader;
11  import java.nio.charset.Charset;
12  import java.util.Properties;
13  
14  
15  /**
16   *
17   */
18  public class ConfigurationParser {
19  
20  	File file = new File("./src/test/resources/in.properties");
21  
22  	Properties readConfiguration() {
23  		Properties p = new Properties();
24  		try {
25  			p.load(new InputStreamReader(new FileInputStream(file), Charset.forName("ISO8859_15")));
26  		} catch (FileNotFoundException e) {
27  			// TODO Auto-generated catch block
28  			e.printStackTrace();
29  		} catch (IOException e) {
30  			// TODO Auto-generated catch block
31  			e.printStackTrace();
32  		}
33  		return p;
34  	}
35  
36  }