@Override public XMLEvent peek() throws XMLStreamException {
  log.log(Level.FINE,"peek()");
  if (!hasNext()) {
    throw new XMLStreamException("The reader is depleted!");
  }
  log.log(Level.FINE,"peek(): {0}",nextEvent);
  return nextEvent;
}

@ Override public XMLEvent peek ( ) throws XMLStreamException { log . log ( Level . FINE , "peek()" ) ; if ( ! hasNext ( ) ) { throw new XMLStreamException ( "The reader is depleted!" ) ; } log . log ( Level . FINE , "peek(): {0}" , nextEvent ) ; return nextEvent ; }
check the next xmlevent without reading it from the stream . returns null if the stream is at eof or has no more xmlevents . a call to peek ( ) will be equal to the next return of next ( ) .
