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 in java. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">