public Properties(File location, InterpolationHelper.SubstitutionCallback callback) throws IOException { this.location = location; this.callback = callback; if(location.exists()) load(location); }
public Properties(File location, InterpolationHelper.SubstitutionCallback callback) throws IOException { this.location = location; this.callback = callback; if(location.exists()) load(location); }
public Properties(File location, InterpolationHelper.SubstitutionCallback callback) throws IOException { this.location = location; this.callback = callback; if(location.exists()) load(location); }
public Properties(File location, InterpolationHelper.SubstitutionCallback callback) throws IOException { this.location = location; this.callback = callback; if(location.exists()) load(location); }
public void load(InputStream is) throws IOException { load(new InputStreamReader(is, DEFAULT_ENCODING)); }
public void load(InputStream is) throws IOException { load(new InputStreamReader(is, DEFAULT_ENCODING)); }
public void load(InputStream is) throws IOException { load(new InputStreamReader(is, DEFAULT_ENCODING)); }
public void load(File location) throws IOException { InputStream is = new FileInputStream(location); try { load(is); } finally { is.close(); } }
public void load(File location) throws IOException { InputStream is = new FileInputStream(location); try { load(is); } finally { is.close(); } }
public void load(URL location) throws IOException { InputStream is = location.openStream(); try { load(is); } finally { is.close(); } }
public void load(File location) throws IOException { InputStream is = new FileInputStream(location); try { load(is); } finally { is.close(); } }
public void load(File location) throws IOException { InputStream is = new FileInputStream(location); try { load(is); } finally { is.close(); } }
public void load(URL location) throws IOException { InputStream is = location.openStream(); try { load(is); } finally { is.close(); } }
public void load(URL location) throws IOException { InputStream is = location.openStream(); try { load(is); } finally { is.close(); } }
public void load(URL location) throws IOException { InputStream is = location.openStream(); try { load(is); } finally { is.close(); } }
public static Properties toProperties(byte[] source) { try { Properties rc = new Properties(false); if (source != null) { rc.load(new ByteArrayInputStream(source)); } return rc; } catch (IOException ex) { throw new IllegalArgumentException("Cannot load properties", ex); } }
@Override public Dictionary<String, Object> read(InputStream in) throws IOException { notNull(in, "Input stream cannot be null"); final Properties props = new Properties(); props.load(in); return new Hashtable<>(props); } }
protected static Properties loadPropertiesFile(URL configPropURL) throws Exception { try ( InputStream is = configPropURL.openConnection().getInputStream() ){ Properties configProps = new Properties(); configProps.load(is); return configProps; } catch (Exception ex) { System.err.println("Error loading config properties from " + configPropURL); System.err.println("Main: " + ex); return null; } }
public Properties getProperties() { Properties props = new Properties(); try { org.apache.felix.utils.properties.Properties properties = new org.apache.felix.utils.properties.Properties(); properties.load(new StringReader(value)); for (Map.Entry<String, String> e : properties.entrySet()) { props.put(e.getKey(), e.getValue()); } } catch (IOException e) { // ignore?? } return props; }
private Properties loadPaxLoggingConfig() { Properties props = new Properties(); FileInputStream fis = null; try { fis = new FileInputStream(log4jConfigPath); props.load(fis); } catch (Exception e) { // Ignore } finally { close(fis); } return props; }