/** * write out the policy */ public void write(Writer policy) { PrintWriter out = new PrintWriter(new BufferedWriter(policy)); Enumeration enum_ = grantElements(); out.println("/* AUTOMATICALLY GENERATED ON "+ (new java.util.Date()) + "*/"); out.println("/* DO NOT EDIT */"); out.println(); // write the (unexpanded) keystore entry as the first entry of the // policy file if (keyStoreUrlString != null) { writeKeyStoreEntry(out); } if (storePassURL != null) { writeStorePassURL(out); } // write "grant" entries while (enum_.hasMoreElements()) { GrantEntry ge = (GrantEntry) enum_.nextElement(); ge.write(out); out.println(); } out.flush(); }
/** * write out the policy */ public void write(Writer policy) { PrintWriter out = new PrintWriter(new BufferedWriter(policy)); Enumeration enum_ = grantElements(); out.println("/* AUTOMATICALLY GENERATED ON "+ (new java.util.Date()) + "*/"); out.println("/* DO NOT EDIT */"); out.println(); // write the (unexpanded) keystore entry as the first entry of the // policy file if (keyStoreUrlString != null) { writeKeyStoreEntry(out); } if (storePassURL != null) { writeStorePassURL(out); } // write "grant" entries while (enum_.hasMoreElements()) { GrantEntry ge = (GrantEntry) enum_.nextElement(); ge.write(out); out.println(); } out.flush(); }