public static Properties readProperties(String name){
  Properties props=new Properties();
  if (globalLoader != null) {
    InputStream is=null;
    try {
      String serviceFile="META-INF/services/" + name.toLowerCase() + ".properties";
      Enumeration<URL> locs=globalLoader.getResources(serviceFile);
      while (locs.hasMoreElements()) {
        URL loc=locs.nextElement();
        if (loc != null) {
          try {
            is=loc.openStream();
            Properties p=new Properties();
            p.load(is);
            props.putAll(p);
          }
  finally {
            if (is != null) {
              is.close();
            }
          }
        }
      }
    }
 catch (    IOException ex) {
      LOG.log(Level.SEVERE,null,ex);
    }
 finally {
      try {
        if (is != null) {
          is.close();
        }
      }
 catch (      IOException ex) {
        LOG.log(Level.SEVERE,null,ex);
      }
    }
  }
  return props;
}

public static Properties readProperties ( String name ) { Properties props = new Properties ( ) ; if ( globalLoader != null ) { InputStream is = null ; try { String serviceFile = "META-INF/services/" + name . toLowerCase ( ) + ".properties" ; Enumeration < URL > locs = globalLoader . getResources ( serviceFile ) ; while ( locs . hasMoreElements ( ) ) { URL loc = locs . nextElement ( ) ; if ( loc != null ) { try { is = loc . openStream ( ) ; Properties p = new Properties ( ) ; p . load ( is ) ; props . putAll ( p ) ; } finally { if ( is != null ) { is . close ( ) ; } } } } } catch ( IOException ex ) { LOG . log ( Level . SEVERE , null , ex ) ; } finally { try { if ( is != null ) { is . close ( ) ; } } catch ( IOException ex ) { LOG . log ( Level . SEVERE , null , ex ) ; } } } return props ; }
read a file in the meta - inf / services named name appended with " . properties " if no file is found , then a an empty property instance will be returned
