code: public static Properties getResourceAsProperties(ClassLoader loader, String resource) throws IOException {
          Properties props = new Properties();
          InputStream in = null;
          String propfile = resource;
          in = getResourceAsStream(loader, propfile);
          props.load(in);
          in.close();
          return props;
      }
docs: Returns a resource on the classpath as a Properties object
  
  @param loader
  The classloader used to load the resource
  @param resource
  The resource to find
  @throws IOException
  If the resource cannot be found or read
  @return The resource