List of utility methods to do Properties Load from File
Properties | loadProperties(String fileName, boolean systemOverride) load Properties Properties kernelProps = new Properties(); InputStream is = null; boolean propsLoaded = false; if (fileName != null && fileName.length() > 0) { try { is = new BufferedInputStream(new FileInputStream(fileName)); if (fileName.endsWith(".xml")) kernelProps.loadFromXML(is); ... |
void | loadProperties(String fileName, Properties properties) load Properties try { FileInputStream fis = new FileInputStream(makeFullPathname(fileName)); BufferedInputStream bis = new BufferedInputStream(fis); properties.load(bis); bis.close(); fis.close(); } catch (FileNotFoundException e) { } catch (IOException e) { ... |
Properties | loadProperties(String filePath) load Properties File file = new File(filePath); if (!file.exists()) { try { file.createNewFile(); } catch (IOException e) { throw new IllegalStateException(e); return loadProperties(file); |
Properties | loadProperties(String filePath) load Properties InputStream inputStream = ClassLoader.getSystemResourceAsStream(filePath); Properties properties = new Properties(); properties.load(inputStream); inputStream.close(); return properties; |
Properties | loadProperties(String path) load Properties Properties properties = new Properties(); try { properties.load(new FileInputStream(path)); return properties; } catch (IOException e) { throw new RuntimeException("Cannot open " + path); |
Properties | loadProperties(String path, Class> caller) load Properties InputStream is = getResourceAsStream(path, caller); if (is == null) { return null; Properties p = new Properties(); try { p.load(is); } catch (IOException ioe) { ... |
Properties | loadProperties(String path, Properties defaults) load Properties return loadProperties(new File(path), defaults); |
Properties | loadProperties(String propertiesFile) load Properties if (propertiesFile != null) { File file = new File(propertiesFile); if (file.exists()) { Properties properties = new Properties(); FileInputStream inputStream = new FileInputStream(propertiesFile); try { properties.load(inputStream); } finally { ... |
Properties | loadProperties(String propertiesFile) load Properties Properties props = new Properties(); InputStream in = new FileInputStream(propertiesFile); props.load(in); in.close(); return props; |
void | loadProperties(String propertyFile) load Properties FileInputStream input;
input = new FileInputStream(propertyFile);
properties.load(input);
|