Code example for PropertyResourceBundle

Methods: getString

0
		// Èç¹ûûÓгõʼ»¯²Å¶ÁÊý¾Ý¿â 
		if (PAGE_NUM == 0) {
			InputStream is = ReqUtil.class
					.getResourceAsStream("/page.properties");
			try { 
				PropertyResourceBundle prb = new PropertyResourceBundle(is);
				String str = prb.getString(key);
				if (str != null) {
					Integer it = new Integer(str);
					PAGE_NUM = it.intValue();
				} else 
					// if not config ,return default value. 
					PAGE_NUM = DEF_PAGE_NUM;
 
			} catch (Exception ex) {
				PAGE_NUM = DEF_PAGE_NUM;
				ex.printStackTrace();
			} 
		} 
		return PAGE_NUM;
Connect your IDE to all the code out there  Get Codota for Java