Java Code Examples for org.apache.commons.configuration.HierarchicalINIConfiguration#setDelimiterParsingDisabled()

The following examples show how to use org.apache.commons.configuration.HierarchicalINIConfiguration#setDelimiterParsingDisabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HierarchicalIniConfigurationWrapper.java    From StatsAgg with Apache License 2.0 6 votes vote down vote up
private void readHierarchicalIniConfigurationFile(File hierarchicalIniFile) {
    
    if (hierarchicalIniFile == null) {
        return;
    }
    
    try {
        if (hierarchicalIniFile.exists()) {
            configurationDirectory_ = hierarchicalIniFile.getParent();
            configurationFilename_ = hierarchicalIniFile.getName();

            hierarchicalIniConfiguration_ = new HierarchicalINIConfiguration();
            hierarchicalIniConfiguration_.setDelimiterParsingDisabled(true);
            hierarchicalIniConfiguration_.setAutoSave(false);
            hierarchicalIniConfiguration_.load(hierarchicalIniFile);
        }
    }
    catch (Exception e) {
        logger.error(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
        
        configurationDirectory_ = null;
        configurationFilename_ = null;
        hierarchicalIniConfiguration_ = null;
    }
}
 
Example 2
Source File: HierarchicalIniConfigurationWrapper.java    From StatsAgg with Apache License 2.0 6 votes vote down vote up
private void readHierarchicalIniConfigurationFile(InputStream configurationInputStream) {
    
    if (configurationInputStream == null) {
        return;
    }
    
    try {
        configurationInputStream_ = configurationInputStream;
        
        hierarchicalIniConfiguration_ = new HierarchicalINIConfiguration();
        hierarchicalIniConfiguration_.setDelimiterParsingDisabled(true);
        hierarchicalIniConfiguration_.setAutoSave(false);
        hierarchicalIniConfiguration_.load(configurationInputStream, null);
    }
    catch (Exception e) {
        logger.error(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
        
        configurationInputStream_ = null;
        hierarchicalIniConfiguration_ = null;
    }
}
 
Example 3
Source File: HierarchicalIniConfigurationWrapper.java    From StatsAgg with Apache License 2.0 5 votes vote down vote up
private void readHierarchicalIniConfigurationFile(String filePathAndFilename) {
    
    if (filePathAndFilename == null) {
        return;
    }
    
    try {
        File hierarchicalIniConfigurationFile_ = new File(filePathAndFilename);
        boolean doesFileExist = FileIo.doesFileExist(filePathAndFilename);
        
        if (doesFileExist) {
            configurationDirectory_ = hierarchicalIniConfigurationFile_.getParent();
            configurationFilename_ = hierarchicalIniConfigurationFile_.getName();

            hierarchicalIniConfiguration_ = new HierarchicalINIConfiguration();
            hierarchicalIniConfiguration_.setDelimiterParsingDisabled(true);
            hierarchicalIniConfiguration_.setAutoSave(false);
            hierarchicalIniConfiguration_.load(hierarchicalIniConfigurationFile_);
        }
    }
    catch (Exception e) {
        logger.error(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
        
        configurationDirectory_ = null;
        configurationFilename_ = null;
        hierarchicalIniConfiguration_ = null;
    }
}