/** * Loads the properties stored in the given file. This method does nothing if * the file does not exist or is unreadable. Appends the contents of the loaded * properties to the already stored contents. * * @param in the input stream used to read the properties. */ public void load(final InputStream in) { if (in == null) { throw new NullPointerException(); } try { final BufferedInputStream bin = new BufferedInputStream(in); final Properties p = new Properties(); p.load(bin); this.getConfiguration().putAll(p); bin.close(); } catch (IOException ioe) { Log.warn("Unable to read configuration", ioe); } }
/** * Loads the properties stored in the given file. This method does nothing if * the file does not exist or is unreadable. Appends the contents of the loaded * properties to the already stored contents. * * @param in the input stream used to read the properties. */ public void load(final InputStream in) { if (in == null) { throw new NullPointerException(); } try { final BufferedInputStream bin = new BufferedInputStream(in); final Properties p = new Properties(); p.load(bin); this.getConfiguration().putAll(p); bin.close(); } catch (IOException ioe) { Log.warn("Unable to read configuration", ioe); } }
/** * Loads the properties stored in the given file. This method does nothing if * the file does not exist or is unreadable. Appends the contents of the loaded * properties to the already stored contents. * * @param in the input stream used to read the properties. */ public void load(final InputStream in) { if (in == null) { throw new NullPointerException(); } try { final BufferedInputStream bin = new BufferedInputStream(in); final Properties p = new Properties(); p.load(bin); this.getConfiguration().putAll(p); bin.close(); } catch (IOException ioe) { Log.warn("Unable to read configuration", ioe); } }