标签:style class blog code java http
/** * 得到汉字字库的集合 * @return */ public static Map getChinaWordStorage() { BufferedReader bu=null; try { Map map=new TreeMap(); bu=new BufferedReader(new InputStreamReader(new FileInputStream(getPropertiesByKey("chinaWord")),"UTF-8"));//文件放在tomcat/bin下 String line= bu.readLine(); // System.out.println(line); while(line!=null&&!line.equals("")) { map.put(line.trim(), line.trim().substring(0,1)); line= bu.readLine(); } //bu.close(); return map; } catch (Exception e) { e.printStackTrace(); return null; } finally{ if(bu!=null){ try { bu.close(); } catch (IOException e) { e.printStackTrace(); } } } }
读枯燥的技术书时怎么集中精神?,布布扣,bubuko.com
标签:style class blog code java http
原文地址:http://www.cnblogs.com/smiler/p/3772700.html