public void load() throws FileNotFoundException, IOException {
  BufferedReader is=new BufferedReader(new InputStreamReader(new FileInputStream(file)));
  ArrayList<String> buf=new ArrayList<>();
  while (is.ready()) {
    String line=is.readLine();
    if (line.startsWith(COMMENT_PREFIX)) {
      continue;
    }
    if (line.length() == 0 && !buf.isEmpty()) {
      String title=buf.remove(0);
      store.add(new Pair<>(title,buf));
      buf=new ArrayList<>();
    }
 else {
      buf.add(line);
    }
  }
  if (!buf.isEmpty()) {
    String title=buf.remove(0);
    store.add(new Pair<>(title,buf));
    buf=new ArrayList<>();
  }
  is.close();
}

public void load ( ) throws FileNotFoundException , IOException { BufferedReader is = new BufferedReader ( new InputStreamReader ( new FileInputStream ( file ) ) ) ; ArrayList < String > buf = new ArrayList < > ( ) ; while ( is . ready ( ) ) { String line = is . readLine ( ) ; if ( line . startsWith ( COMMENT_PREFIX ) ) { continue ; } if ( line . length ( ) == 0 && ! buf . isEmpty ( ) ) { String title = buf . remove ( 0 ) ; store . add ( new Pair < > ( title , buf ) ) ; buf = new ArrayList < > ( ) ; } else { buf . add ( line ) ; } } if ( ! buf . isEmpty ( ) ) { String title = buf . remove ( 0 ) ; store . add ( new Pair < > ( title , buf ) ) ; buf = new ArrayList < > ( ) ; } is . close ( ) ; }
read the current file
