Archive for July, 2009

print diff result

Wednesday, July 15th, 2009

find src|awk ‘{print “diff “$0″ bak/” $0 “>diff/”$0}’|less

how to build .properties

Thursday, July 2nd, 2009
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());
	}
}