public final int next ( ) throws IOException { if ( m_nextException != null ) { throw m_nextException ; } try { return doNext ( ) ; } catch ( IOException e ) { m_nextException = e ; resetState ( ) ; throw e ; } }
Advances to the next tag . Once method returns END_DOCUMENT it always returns END_DOCUMENT . Once method throws an exception it always throws the same exception .