/** * Writes the rules back to file system * * @throws IOException */ public void storeRules() throws IOException { OutputStream os = null; try { // turn back the users into a users map Properties p = toProperties(); // write out to the data dir Resource propFile = securityDir.get(propertyFileName); os = propFile.out(); p.store(os, null); lastModified = System.currentTimeMillis(); } catch (Exception e) { if (e instanceof IOException) throw (IOException) e; else throw (IOException) new IOException("Could not write rules to " + propertyFileName) .initCause(e); } finally { if (os != null) os.close(); } }