List of utility methods to do Properties Load from File
Properties | loadProperties(File file) Convenient call to load a properties file from the provided file if (file == null) return null; FileReader reader = new FileReader(file); try { return loadProperties(reader); } finally { reader.close(); |
Map | loadProperties(File file) load Properties Properties properties = new Properties(); try (InputStream in = new FileInputStream(file)) { properties.load(in); return fromProperties(properties); |
Properties | loadProperties(File file) load Properties if (file != null) { if (!file.isDirectory()) { InputStream inputStream = new FileInputStream(file); return loadProperties(inputStream); } else { return loadPropertyDirectory(file); return null; |
Properties | loadProperties(File file) load Properties Properties props = new Properties(); try { final InputStream in = new BufferedInputStream(new FileInputStream(file)); try { props.load(in); return props; } finally { safeClose(in); ... |
Properties | loadProperties(File file) Loads a file into a Properties object Properties properties = new Properties(); FileInputStream fis = new FileInputStream(file); try { properties.load(fis); } finally { fis.close(); return properties; ... |
Properties | loadProperties(File file, String charset) load Properties InputStream in = null; try { in = new FileInputStream(file); return loadProperties(in, charset); } finally { if (in != null) { in.close(); |
void | loadProperties(File fileName) load Properties Properties properties = new Properties(); InputStream is = new FileInputStream(fileName); try { properties.load(is); } finally { is.close(); for (Map.Entry<Object, Object> entry : properties.entrySet()) { ... |
Properties | loadProperties(File path) Loads properties from the specified file. if (path == null) { throw new IllegalArgumentException("path must not be null"); try (FileInputStream in = new FileInputStream(path)) { Properties properties = new Properties(); properties.load(in); return properties; |
Properties | loadProperties(File propertyFile) load Properties Properties properties = new Properties(); if (propertyFile.exists()) { InputStream in = null; try { in = new FileInputStream(propertyFile); properties.load(in); } catch (IOException e) { throw new RuntimeException(e); ... |
boolean | loadProperties(File propertyFile, Properties properties) load Properties if (propertyFile.exists()) { FileInputStream fis = null; try { fis = new FileInputStream(propertyFile); properties.load(fis); fis.close(); return true; } catch (IOException e) { ... |