private static List splitPGNStubs(String pgn) throws IOException {
    List pgnGameStubs = new LinkedList();
    BufferedReader br = new BufferedReader(new StringReader(pgn));
    String line;
    StringBuffer buffer = new StringBuffer();
    int offset = 0;
    int c = 0;

    while ((line = br.readLine()) != null) {
      c += line.length() + 2;
      line = line.trim();

      if (!PGNParseUtils.isEmpty(line)) {
        if (line.startsWith("[") && line.endsWith("]")) {
          buffer.append(line + "\r\n");
        }

        if (line.endsWith("1-0") || line.endsWith("0-1") || line.endsWith("1/2-1/2")
            || line.endsWith("*")) {
          pgnGameStubs.add(new Object[] { buffer.toString(), new Integer(offset) });
          offset = c;
          buffer.delete(0, buffer.length());
        }
      }
    }
    br.close();

    return pgnGameStubs;
  }