/** * Loads the associated file from the specified URL. The location stored in * this object is not changed. * * @param url the URL of the file to be loaded * @throws ConfigurationException if an error occurs */ public void load(final URL url) throws ConfigurationException { load(url, checkContentAndGetLocator()); }
/** * Saves the associated file to the current location set for this object. * Before this method can be called a valid location must have been set. * * @throws ConfigurationException if an error occurs or no location has been * set yet */ public void save() throws ConfigurationException { save(checkContentAndGetLocator()); }
/** * Loads the associated file from the specified stream, using the encoding * returned by {@link #getEncoding()}. * * @param in the input stream * @throws ConfigurationException if an error occurs during the load * operation */ public void load(final InputStream in) throws ConfigurationException { load(in, checkContentAndGetLocator()); }
/** * Saves the associated file to the specified URL. This does not change the * location of this object (use {@link #setURL(URL)} if you need it). * * @param url the URL * @throws ConfigurationException if an error occurs during the save * operation */ public void save(final URL url) throws ConfigurationException { save(url, checkContentAndGetLocator()); }
/** * Saves the associated file to the specified stream using the encoding * returned by {@link #getEncoding()}. * * @param out the output stream * @throws ConfigurationException if an error occurs during the save * operation */ public void save(final OutputStream out) throws ConfigurationException { save(out, checkContentAndGetLocator()); }
/** * Loads the associated file from the underlying location. If no location * has been set, an exception is thrown. * * @throws ConfigurationException if loading of the configuration fails */ public void load() throws ConfigurationException { load(checkContentAndGetLocator()); }
/** * Saves the associated file to the specified {@code File}. The file is * created automatically if it doesn't exist. This does not change the * location of this object (use {@link #setFile} if you need it). * * @param file the target file * @throws ConfigurationException if an error occurs during the save * operation */ public void save(final File file) throws ConfigurationException { save(file, checkContentAndGetLocator()); }
/** * Loads the associated file from the given file name. The file name is * interpreted in the context of the already set location (e.g. if it is a * relative file name, a base path is applied if available). The underlying * location is not changed. * * @param fileName the name of the file to be loaded * @throws ConfigurationException if an error occurs */ public void load(final String fileName) throws ConfigurationException { load(fileName, checkContentAndGetLocator()); }
/** * Saves the associated file to the specified file name. This does not * change the location of this object (use {@link #setFileName(String)} if * you need it). * * @param fileName the file name * @throws ConfigurationException if an error occurs during the save * operation */ public void save(final String fileName) throws ConfigurationException { save(fileName, checkContentAndGetLocator()); }