@Override
  public void close() throws IOException {
    while (!atEndOfData) {
      char ch = reader.read();

      if (ch == '?') {
        char ch2 = reader.read();

        if (ch2 == '>') {
          atEndOfData = true;
        }
      }
    }
  }
@Override
  public void close()