/** * Fetches the next element if it hasn't been fetched yet and stores it in {@link #nextElement}. * * @throws X */ private void lookAhead() { if (nextElement == null && !isClosed()) { nextElement = getNextElement(); if (nextElement == null) { try { close(); } catch (IOException ioe) { closeException = ioe; } } } }
/** * Fetches the next element if it hasn't been fetched yet and stores it in {@link #nextElement}. * * @throws X */ private void lookAhead() { if (nextElement == null && !isClosed()) { nextElement = getNextElement(); if (nextElement == null) { try { close(); } catch (IOException ioe) { closeException = ioe; } } } }
/** * Fetches the next element if it hasn't been fetched yet and stores it in {@link #nextElement}. * * @throws X */ private void lookAhead() { if (nextElement == null && !isClosed()) { nextElement = getNextElement(); if (nextElement == null) { try { close(); } catch (IOException ioe) { closeException = ioe; } } } }