try {
  public boolean hasNext()    throws XMLStreamException  {    if (!lookahead)      {        try          {            next();          }        catch (NoSuchElementException e)          {            event = -1;          }        lookahead = true;      }    return event != -1;  }