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());
	}
}

Leave a Reply