/** @file\r
ConfigReader class.\r
- \r
- ConfigReader is used to read tool chain config file with flat format. \r
- \r
+\r
+ ConfigReader is used to read tool chain config file with flat format.\r
+\r
Copyright (c) 2006, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
**/\r
package org.tianocore.build.toolchain;\r
\r
-import org.tianocore.exception.EdkException;\r
+import org.tianocore.common.exception.EdkException;\r
\r
import java.io.BufferedReader;\r
import java.io.File;\r
import java.util.List;\r
\r
/**\r
- \r
+\r
ConfigReader is used to read tool chain config file with flat format. Comments\r
is line starting with character '#'.\r
- \r
+\r
@since GenBuild 1.0\r
**/\r
public class ConfigReader {\r
\r
\r
/**\r
- Public construct method. \r
+ Public construct method.\r
**/\r
public ConfigReader () {\r
}\r
\r
/**\r
Default filepath is ".".\r
- \r
+\r
@param filename the config file name like "target.txt"\r
@return the variables defined in file\r
**/\r
\r
/**\r
Get all variables defined in config file. the config file format is flat\r
- with "A=B". If line started with '#' looks as comments. \r
- \r
+ with "A=B". If line started with '#' looks as comments.\r
+\r
@param confPath the path of config file\r
@param filename the file name of the config file\r
@return the variables defined in the config file\r
// without '=', or start with '='\r
//\r
int index;\r
- if (str.length() == 0 || str.startsWith("#") || \r
+ if (str.length() == 0 || str.startsWith("#") ||\r
(index = str.indexOf('=')) <= 0) {\r
continue;\r
}\r
\r
public static synchronized ToolChainMap parseToolChainConfig(File ConfigFile) throws EdkException {\r
ToolChainMap map = new ToolChainMap();\r
- \r
+\r
try {\r
FileReader reader = new FileReader(ConfigFile);\r
BufferedReader in = new BufferedReader(reader);\r
// without '=', or start with '='\r
//\r
int index;\r
- if (str.length() == 0 || str.startsWith("#") || \r
+ if (str.length() == 0 || str.startsWith("#") ||\r
(index = str.indexOf('=')) <= 0) {\r
continue;\r
}\r