List of utility methods to do Properties Load from File
Properties | loadPropertiesFromFile(String fullFileName) Load all properties from a file Properties props = new Properties(); loadPropertiesFromFile(props, fullFileName); return props; |
Properties | loadPropertiesFromFile(String pathname) load Properties From File Properties properties = new Properties(); if (pathname == null || pathname.length() == 0) return properties; FileInputStream in = null; in = new FileInputStream(pathname); if (in != null) { properties.load(in); in.close(); ... |
Properties | loadPropertiesFromPath(String propsFilePath) load Properties From Path InputStream is = null; try { is = new BufferedInputStream(new FileInputStream(propsFilePath)); Properties props = new Properties(); props.load(is); return props; } finally { close(is); ... |
Properties | loadPropertiesInClassPath(String propertiesFileName) Read properties by searching the properties file in the classpath Properties props = new Properties(); try { InputStream input = ClassLoader.getSystemResourceAsStream((propertiesFileName)); props.load(input); } catch (Exception e) { return null; return props; ... |
Map | loadProvidersConfiguration(Class Build the provider map for the specified base class. HashMap<String, Class<? extends E>> providers; providers = new HashMap<String, Class<? extends E>>(); InputStream in; in = base.getResourceAsStream(confPropertiesName); if (in != null) { providers.putAll(readProvidersConfiguration(base, in, "built-in")); } else System.err.format("Built-in configuration not found for %s\n", base.getName()); ... |
String | loadPythonScript(String pythonScriptName) load Python Script FileReader fis = new FileReader(pythonScriptName); BufferedReader reader = new BufferedReader(fis); String script = ""; String record = null; while ((record = reader.readLine()) != null) { script = script + System.getProperty("line.separator") + record; return script; ... |
String | loadReader(Reader stream) load Reader BufferedReader r = null; StringBuilder text = new StringBuilder(); try { r = new BufferedReader(stream); String line = null; while ((line = r.readLine()) != null) { text.append(line); text.append(System.getProperty("line.separator")); ... |
Properties | loadRecursively(String propertiesFilename) Load the specified properties file and recursively merge all included properties files. Properties properties = new Properties(); File propertiesFile = new File(propertiesFilename); FileInputStream fis = new FileInputStream(propertiesFile); properties.load(fis); fis.close(); String secondPropertiesFilename = properties.getProperty(PROPERTY_INCLUDE_ABSOLUTE); if (secondPropertiesFilename != null) { properties.remove(PROPERTY_INCLUDE_ABSOLUTE); ... |
void | loadRQGProperties() load RQG Properties isRQGEnabled = true; String propertPath = getRQGConfig(); rqg_environment = new Properties(); InputStream stream = null; if (propertPath == null) { propertPath = "rqg_config.properties"; if (propertPath != null) { ... |
String | loadSetting(InputStream in, String key) load Setting Properties props; props = new Properties(); props.load(in); return props.getProperty(key); |