/** * saveCurrent * * @throws org.exolab.castor.xml.MarshalException if any. * @throws org.exolab.castor.xml.ValidationException if any. * @throws java.io.IOException if any. * @throws java.lang.ClassNotFoundException if any. */ public synchronized void saveCurrent() throws MarshalException, ValidationException, IOException, ClassNotFoundException { m_notifications.setHeader(rebuildHeader()); // Marshal to a string first, then write the string to the file. This // way the original configuration // isn't lost if the XML from the marshal is hosed. StringWriter stringWriter = new StringWriter(); Marshaller.marshal(m_notifications, stringWriter); String xmlString = stringWriter.toString(); saveXML(xmlString); update(); }