@@ -0,0 +1,2095 @@
+package com.glezo.configurationFileReader;%0A%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileReader;%0Aimport java.io.IOException;%0Aimport java.text.ParseException;%0Aimport java.util.HashMap;%0A%0A%0Apublic class ConfigurationFileReader %0A%7B%0A%09private String%09%09%09%09%09configuration_file_path;%0A%09private HashMap%3CString,String%3E%09variables;%0A%09%0A%09//------------------------------------------------------------------------%0A%09public ConfigurationFileReader(String configuration_file_path) throws FileNotFoundException,ParseException,IOException%0A%09%7B%0A%09%09this.configuration_file_path=configuration_file_path;%0A%09%09this.variables=new HashMap%3CString,String%3E();%0A%09%09File f=new File(this.configuration_file_path);%0A%09%09BufferedReader br;%0A%09%09br = new BufferedReader(new FileReader(f));%0A%09%09String current_line = null;%0A%09%09int current_line_number=0;%0A%09%09while ((current_line = br.readLine()) != null) %0A%09%09%7B%0A%09%09%09current_line_number++;%0A%09%09%09String current_line_trimmed=current_line.trim();%0A%09%09%09if(!current_line_trimmed.startsWith(%22#%22))%0A%09%09%09%7B%0A%09%09%09%09int separator_position=current_line_trimmed.indexOf('=');%0A%09%09%09%09if(separator_position==-1)%0A%09%09%09%09%7B%0A%09%09%09%09%09br.close();%0A%09%09%09%09%09throw new ParseException(%22Unparseable line number %22+current_line_number+%22:%5Ct%22+current_line,0);%0A%09%09%09%09%7D%0A%09%09%09%09String current_var_name%09%09=%09current_line_trimmed.substring(0,separator_position).trim();%0A%09%09%09%09String current_var_value%09=%09current_line_trimmed.substring(separator_position+1,current_line_trimmed.length()).trim();%0A%09%09%09%09if(current_var_value.equals(%22%22))%0A%09%09%09%09%7B%0A%09%09%09%09%09br.close();%0A%09%09%09%09%09throw new ParseException(%22Unparseable line number %22+current_line_number+%22:%5Ct%22+current_line,0);%0A%09%09%09%09%7D%0A%09%09%09%09this.variables.put(current_var_name, current_var_value);%0A%09%09%09%7D%0A%09%09%7D%0A%09%09br.close();%0A%09%7D%0A%09//------------------------------------------------------------------------%0A%09public boolean%09exists_variable(String variable_name)%09%09%7B%09return this.variables.get(variable_name)!=null;%09%09%7D%0A%09public String%09get_variable_value(String variable_name)%09%7B%09return this.variables.get(variable_name);%09%09%09%7D%0A%09//------------------------------------------------------------------------%0A%7D%0A

Create ConfigurationFileReader.java