includes/org/apache/poi/hssf/record/RecordFactoryInputStream.java
public Record nextRecord() {
		Record r;
		r = getNextUnreadRecord();
		if (r != null) {
			// found an unread record
			return r;
		}
		while (true) {
			if (!_recStream.hasNextRecord()) {
				// recStream is exhausted;
				return null;
			}

			if (_lastRecordWasEOFLevelZero) {
				// Potential place for ending the workbook stream
				// Check that the next record is not BOFRecord(0x0809)
				// Normally the input stream contains only zero padding after the last EOFRecord,
				// but bug 46987 and 48068 suggests that the padding may be garbage.
				// This code relies on the padding bytes not starting with BOFRecord.sid
				if (_recStream.getNextSid() != BOFRecord.sid) {
					return null;
				}
				// else - another sheet substream starting here
			}

            // step underlying RecordInputStream to the next record
            _recStream.nextRecord();

			r = readNextRecord();
			if (r == null) {
				// some record types may get skipped (e.g. DBCellRecord and ContinueRecord)
				continue;
			}
			return r;
		}
	}
/**
	 * Returns the next (complete) record from the
	 * stream, or null if there are no more.
	 */
Returns the next (complete) record from the
stream, or null if there are no more.
Returns the next ( complete ) record from the stream or null if there are no more .
public Record nextRecord() {
		Record r;
		r = getNextUnreadRecord();
		if (r != null) {
			return r;
		}
		while (true) {
			if (!_recStream.hasNextRecord()) {
				return null;
			}
			if (_lastRecordWasEOFLevelZero) {
				if (_recStream.getNextSid() != BOFRecord.sid) {
					return null;
				}
			}
            _recStream.nextRecord();
			r = readNextRecord();
			if (r == null) {
				continue;
			}
			return r;
		}
	}
public Record nextRecord ( ) { Record r ; r = getNextUnreadRecord ( ) ; if ( r != null ) { return r ; } while ( true ) { if ( ! _recStream . hasNextRecord ( ) ) { return null ; } if ( _lastRecordWasEOFLevelZero ) { if ( _recStream . getNextSid ( ) != BOFRecord . sid ) { return null ; } } _recStream . nextRecord ( ) ; r = readNextRecord ( ) ; if ( r == null ) { continue ; } return r ; } }
Returns the next (complete) record from the
 stream, or null if there are no more.
Returns the next ( complete ) record from the stream or null if there are no more .
// found an unread record // recStream is exhausted; // Potential place for ending the workbook stream // Check that the next record is not BOFRecord(0x0809) // Normally the input stream contains only zero padding after the last EOFRecord, // but bug 46987 and 48068 suggests that the padding may be garbage. // This code relies on the padding bytes not starting with BOFRecord.sid // else - another sheet substream starting here // step underlying RecordInputStream to the next record // some record types may get skipped (e.g. DBCellRecord and ContinueRecord)