code: public void load(Reader r, String id) {
      try {
        // could throw an IO exception?
        TreeReader tr = treeReaderFactory().newTreeReader(r);
        int sentIndex = 0;
        for (Tree pt; (pt = tr.readTree()) != null; ) {
          if (pt.label() instanceof HasIndex) { // so we can trace where this tree came from
            HasIndex hi = (HasIndex) pt.label();
            if (id != null) {
              hi.setDocID(id);
            }
            hi.setSentIndex(sentIndex);
          }
          parseTrees.add(pt);
          sentIndex++;
        }
      } catch (IOException e) {
        System.err.println("load IO Exception: " + e);
      }
    }
docs: Load a collection of parse trees from a Reader.
  Each tree may optionally be encased in parens to allow for Penn
  Treebank style trees.
  
  @param r The reader to read trees from.  (If you want it buffered,
  you should already have buffered it!)
  @param id An ID for where these files come from (arbitrary, but
  something like a filename.  Can be <code>null</code> for none.