List of utility methods to do Properties Load from File
Properties | loadProperties(Properties properties, File propertyFile) load Properties try (FileInputStream inStream = new FileInputStream(propertyFile)) { properties.load(inStream); } catch (IOException e) { throw new IllegalArgumentException(String.format("Error loading %s", propertyFile.getAbsolutePath()), e); return properties; |
Properties | loadProperties(Properties properties, File propertyFile) load Properties try (FileInputStream inStream = new FileInputStream(propertyFile)) { properties.load(inStream); } catch (IOException e) { throw new IllegalArgumentException(String.format("Error loading %s", propertyFile.getAbsolutePath()), e); return properties; |
Properties | loadProperties(String configFilePath) Load the Properties object from the configuration object. InputStream in = null; try { Properties prop = new Properties(); in = new FileInputStream(configFilePath); prop.load(in); return prop; } catch (IOException e) { return null; ... |
Properties | loadProperties(String configurationFileProperty, String configurationFileDefault) load Properties String propsFileUserPath = System.getProperty(configurationFileProperty, configurationFileDefault); Properties props = new Properties(); props.load(new FileReader(new File(propsFileUserPath))); return props; |
Properties | loadProperties(String configurationPath) Load the properties for the application. Properties props = new Properties(); try (FileInputStream inputStream = new FileInputStream(configurationPath)) { props.load(inputStream); return props; |
Properties | loadProperties(String file) load Properties try { Properties properties = new Properties(); InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(file); if (in != null) properties.load(in); return properties; } catch (IOException e) { return null; ... |
Properties | loadProperties(String filename) load Properties if (filename == null) { System.err.println("No " + filename + " properties file specified."); System.exit(1); Properties props = new Properties(); try { FileInputStream fis = new FileInputStream(filename); if (fis == null) { ... |
Properties | loadProperties(String fileName) load Properties Properties properties = null; InputStream stream = null; try { stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName); if (null == stream) { throw new FileNotFoundException(fileName + "is Not Found"); properties = new Properties(); ... |
Properties | loadProperties(String filename) load Properties return loadProperties(new File(filename)); |
Properties | loadProperties(String fileName) load Properties Properties prop = new Properties(); File file = new File(fileName); BufferedInputStream in = null; try { in = new BufferedInputStream(new FileInputStream(file)); prop.load(in); } catch (FileNotFoundException e) { e.printStackTrace(); ... |