@Override public void read(final Reader reader) throws ConfigurationException, IOException { fetchFileBased().read(reader); }
@Override public void write(final Writer writer) throws ConfigurationException, IOException { fetchFileBased().write(writer); }
/** * Internal helper method for saving a file into the given writer. * * @param out the writer * @throws ConfigurationException if an error occurs */ private void saveToWriter(final Writer out) throws ConfigurationException { fireSavingEvent(); try { getContent().write(out); } catch (final IOException ioex) { throw new ConfigurationException(ioex); } finally { fireSavedEvent(); } }
/** * Internal helper method for loading a file from the given reader. * * @param in the reader * @throws ConfigurationException if an error occurs */ private void loadFromReader(final Reader in) throws ConfigurationException { fireLoadingEvent(); try { getContent().read(in); } catch (final IOException ioex) { throw new ConfigurationException(ioex); } finally { fireLoadedEvent(); } }