Code example for Properties

Methods: store

0
			//把config建在(自定义)app_config的目录下 
			File dirConf = mContext.getDir(APP_CONFIG, Context.MODE_PRIVATE);
			File conf = new File(dirConf, APP_CONFIG);
			fos = new FileOutputStream(conf);
			 
			p.store(fos, null);
			fos.flush();
		}catch(Exception e){	
			e.printStackTrace();
		}finally{ 
			try { 
				fos.close();
			} catch (Exception e) {}
		} 
	} 
 
	public void set(Properties ps)
	{ 
		Properties props = get();
		props.putAll(ps);
		setProps(props);