code: public void parse(Reader reader) throws IOException {
          mScanner = new Scanner(reader);
  
          mScanner.addErrorListener(new ErrorListener() {
              public void parseError(ErrorEvent e) {
                  dispatchParseError(e);
              }
          });
  
          try {
              parseProperties();
          }
          finally {
              mScanner.close();
          }
      }
docs: Parses properties from the given reader and stores them in the Map. To
  capture any parsing errors, call addErrorListener prior to parsing.