code: public static void readUntil(BufferedReader reader, String breakpoint) throws IOException {
          String line;
          while ((line = reader.readLine()) != null) {
              if (line.equals(breakpoint)) {
                  return;
              }
          }
      }
docs: Read until the current line equals the breakpoint string.