Returns the base path. One way to specify the location of a configuration
source is by setting its base path and its file name. This method returns
this base path. The concrete value returned by this method depends on the
way the location of the configuration file was set. If methods like
setFile() or setURL() were used, the base
path typically points to the parent directory of the configuration file
(e.g. for the URL file:/temp/test.properties the base path
will be file:/temp/). If the base path was explictly set
using setBasePath(), this method will return the exact
value specified here without further modifications.
the base path See Also:AbstractFileConfiguration.setBasePath(String)
Load the configuration from the underlying URL. If the URL is not
specified, it attempts to locate the specified file name.
throws: ConfigurationException - if an error occurs during the load operation
Locate the specified file and load the configuration.
Parameters: fileName - the name of the file loaded throws: ConfigurationException - if an error occurs during the load operation
Load the configuration from the specified file.
Parameters: file - the loaded file throws: ConfigurationException - if an error occurs during the load operation
Load the configuration from the specified URL.
Parameters: url - the URL of the file loaded throws: ConfigurationException - if an error occurs during the load operation
Load the configuration from the specified stream, using the encoding
returned by
FileConfiguration.getEncoding() .
Parameters: in - the input stream throws: ConfigurationException - if an error occurs during the load operation
Load the configuration from the specified stream, using the specified
encoding. If the encoding is null the default encoding is used.
Parameters: in - the input stream Parameters: encoding - the encoding used. null to use the default encoding throws: ConfigurationException - if an error occurs during the load operation
Load the configuration from the specified reader.
Parameters: in - the reader throws: ConfigurationException - if an error occurs during the load operation
Save the configuration to the specified file.
Parameters: fileName - the name of the file to be saved throws: ConfigurationException - if an error occurs during the save operation
Save the configuration to the specified file.
Parameters: file - specifies the file to be saved throws: ConfigurationException - if an error occurs during the save operation
Save the configuration to the specified URL if it's a file URL.
Parameters: url - the URL throws: ConfigurationException - if an error occurs during the save operation
Save the configuration to the specified stream, using the encoding
returned by
FileConfiguration.getEncoding() .
Parameters: out - the output stream throws: ConfigurationException - if an error occurs during the save operation
Save the configuration to the specified stream, using the specified
encoding. If the encoding is null the default encoding is used.
Parameters: out - the output stream Parameters: encoding - the encoding to be used throws: ConfigurationException - if an error occurs during the save operation
Save the configuration to the specified writer.
Parameters: out - the writer throws: ConfigurationException - if an error occurs during the save operation
Sets the base path. The methods setBasePath() and
setFileName() can be used together to specify the location
of the configuration file to be loaded. If relative file names are to
be resolved (e.g. for the include files supported by
PropertiesConfiguration), this base path will be used.
Parameters: basePath - the base path.
Set the encoding used to store the configuration file. Set the encoding
to null to use the default encoding.
Parameters: encoding - the encoding to use since: 1.1