Esempio n. 1
0
  /** Parses the positions. */
  private void parsePositions(BufferedReader br, final List<PositionInfo> posList)
      throws IOException, PatternSyntaxException {
    Pattern mrp = Pattern.compile(PARSE_REGEX);

    String line = ParserUtils.getNextLongLine(br);
    while (line != null) {
      Matcher m = mrp.matcher(line);
      if (m.find()) {
        posList.add(new PositionInfo(m.group(1), m.group(2), ParserUtils.filter(m.group(3))));
      } else {
        // parse failed; break out of loop
        break;
      }

      line = ParserUtils.getNextLongLine(br);
    }
  } // parsePositions()