package com.tenwa.httpclient.resources; import java.io.IOException; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import com.amarsoft.are.ARE; import com.tenwa.httpclient.ResultMessage; public class GPSConfigure { private static final Map attributes; static{ attributes = new ConcurrentHashMap(); Properties prop = new Properties(); try { prop.load(GPSConfigure.class.getResourceAsStream("/gps.properties")); for(Entry entry : prop.entrySet()) { if(entry.getKey() == null || entry.getValue() == null) { continue; } attributes.put(entry.getKey().toString(), entry.getValue().toString()); } } catch (IOException e) { e.printStackTrace(); ARE.getLog().error("init GPSConfigure info failed"); } ARE.getLog().info("init GPSConfigure info success"); } public static String get(String propName) { return attributes.get(propName); } }