code: private static Properties loadPropsFromResource(String resourceName, boolean failOnResourceNotFoundOrNotLoaded) {
  		Properties props = new Properties();
  		InputStream resource = PropertyLoaderFromResource.class.getResourceAsStream(resourceName);
  		boolean resourceNotFound = (resource == null);
  		if(resourceNotFound) {
  			if(failOnResourceNotFoundOrNotLoaded) {
  				throw new ConfigException("resource " + resourceName + " not found");
  			} else {
  				// if the resource is not found, return an empty Properties
  				logger.warn("Skipping resource " + resourceName + ": file not found.");
  				return props;
  			}
  		}
  		try {
  			props.load(resource);
  		} catch (IOException e) {
  			if(failOnResourceNotFoundOrNotLoaded)
  				throw new ConfigException("Cannot load properties from " + resourceName, e);
  			else
  				logger.warn("Cannot load properties from " + resourceName + ": " + e.getMessage());
  		}
  		return props;
  	}
docs: Load properties from a resource.
  
  @param resourceName
  @param failOnResourceNotFoundOrNotLoaded when true, a ConfigException
  is raised if the resource cannot be found or loaded
  @return a {@link Properties} instance with the properties loaded from the resource;
  might be empty if the resource is not found or if it cannot be loaded
  @throws ConfigException if the resource cannot be found or loaded,
  and failOnResourceNotFound is true
  
  @see Properties#load(InputStream)