how to build .properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| if (null == transactionCodeConfig) {
transactionCodeConfig = new Properties();
transactionCodeConfig.load(Obj2XMLBuilderXSD.class
.getResourceAsStream("/config/transactionCodeConfig.properties"));
xsdMap = new HashMap();
for (Iterator iterator = transactionCodeConfig.entrySet().iterator(); iterator.hasNext();) {
Entry entry = (Entry) iterator.next();
BufferedReader br = new BufferedReader(new InputStreamReader(
Obj2XMLBuilderXSD.class.getResourceAsStream("/config/xsd/" + entry.getValue())));
String aLine;
StringBuffer xsdContent = new StringBuffer("");
aLine = br.readLine();
while (null != aLine) {
xsdContent.append(aLine);
aLine = br.readLine();
}
br.close();
xsdMap.put(entry.getKey(), xsdContent.toString());
}
} |
This entry was posted
on Thursday, July 2nd, 2009 at 12:16 am and is filed under java.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.