List of utility methods to do Properties Load from File
Properties | load(File propertiesFile) Loads a properties file. if (!checkNotNull(propertiesFile).exists()) { return new Properties(); InputStream in = null; try { in = new BufferedInputStream(new FileInputStream(propertiesFile)); Properties properties = new Properties(); if (propertiesFile.getName().endsWith(".xml")) { ... |
Properties | load(final Class> key, final String env, final Properties defaults) load try (InputStream is = key.getResourceAsStream(env + ".properties")) { final Properties rval = new Properties(defaults); rval.load(is); return rval; } catch (final Exception e) { return new Properties(defaults); |
void | load(final Properties props, final Properties toLoad) load for (final String key : toLoad.stringPropertyNames()) { final String value = toLoad.getProperty(key); assert value != null; props.setProperty(key, value); |
Properties | load(final String folder, final String fileName) load final Properties properties = new Properties(); try (InputStream in = new FileInputStream(new File(folder, fileName))) { properties.load(in); return properties; |
Properties | load(InputStream in) load Properties p = new Properties(); try { p.load(in); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); return p; |
void | load(InputStream input) load Properties props = new Properties(); try { props.load(input); } catch (IOException e) { } finally { if (input != null) try { input.close(); ... |
LinkedHashMap | load(InputStream inputStream) load LinkedHashMap<String, String> properties = new LinkedHashMap<String, String>(); BufferedReader in = new BufferedReader(new InputStreamReader(inputStream)); while (true) { String line = in.readLine(); if (line == null) return properties; if (line.length() > 0) { int len = line.length(); ... |
String | load(InputStream is) load try (BufferedReader in = new BufferedReader(new InputStreamReader(is))) { String line; StringBuilder responseData = new StringBuilder(); while ((line = in.readLine()) != null) { responseData.append(line).append(NEW_LINE); return responseData.toString(); |
void | load(InputStream stream) load load(stream, false); |
void | load(Map load if (new File(fileName).exists()) { try { load(map, new FileInputStream(fileName)); } catch (FileNotFoundException e) { throw new RuntimeException(e); |