Code example for Properties

Methods: storeToXML

0
	public boolean insert(Properties props) throws SQLException {
		boolean bReturn = true;
 
		try { 
			ByteArrayOutputStream stream = new ByteArrayOutputStream();
			props.storeToXML(stream, null);
 
			ContentValues initialValues = new ContentValues();
			initialValues.put(PARAMS, stream.toString());
 
			long id = mDb.insert(DATABASE_TABLE, null, initialValues);
 
			bReturn = (id > 0);
		} catch (Exception ex) {
			bReturn = false;
		} 
 
		return (bReturn);
	} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE