code: public static Properties readProperties(InputStream is, Properties props) throws IOException{
          if(props==null)
              props = new Properties();
          try{
              props.load(is);
          }finally{
              is.close();
          }
          return props;
      }
docs: Reads Properties from given inputStream and returns it.
  NOTE: the given stream is closed by this method