added anoter mergeProperties to take a File object instead of a String path

Former-commit-id: efd4a93b47beac16c7005bf8dc62436de4c2cde6
This commit is contained in:
Jeremy Long
2013-10-20 21:27:18 -04:00
parent 5980d0a6fa
commit 9fdf22a475

View File

@@ -195,6 +195,23 @@ public final class Settings {
}
}
/**
* Merges a new properties file into the current properties. This method
* allows for the loading of a user provided properties file.<br/><br/>
* Note: even if using this method - system properties will be loaded before
* properties loaded from files.
*
* @param filePath the path to the properties file to merge.
* @throws FileNotFoundException is thrown when the filePath points to a
* non-existent file
* @throws IOException is thrown when there is an exception loading/merging
* the properties
*/
public static void mergeProperties(File filePath) throws FileNotFoundException, IOException {
final FileInputStream fis = new FileInputStream(filePath);
mergeProperties(fis);
}
/**
* Merges a new properties file into the current properties. This method
* allows for the loading of a user provided properties file.<br/><br/>