includes/org/apache/poi/hssf/record/RecordFactoryInputStream.java
private Record readNextRecord() {

		Record record = RecordFactory.createSingleRecord(_recStream);
		_lastRecordWasEOFLevelZero = false;

		if (record instanceof BOFRecord) {
			_bofDepth++;
			return record;
		}

		if (record instanceof EOFRecord) {
			_bofDepth--;
			if (_bofDepth < 1) {
				_lastRecordWasEOFLevelZero = true;
			}

			return record;
		}

		if (record instanceof DBCellRecord) {
			// Not needed by POI.  Regenerated from scratch by POI when spreadsheet is written
			return null;
		}

		if (record instanceof RKRecord) {
			return RecordFactory.convertToNumberRecord((RKRecord) record);
		}

		if (record instanceof MulRKRecord) {
			Record[] records = RecordFactory.convertRKRecords((MulRKRecord) record);

			_unreadRecordBuffer = records;
			_unreadRecordIndex = 1;
			return records[0];
		}

		if (record.getSid() == ContinueRecord.sid) {
			if (_lastRecord instanceof ObjRecord || _lastRecord instanceof TextObjectRecord) {
				//we must remember the position of the continue record.
				//in the serialization procedure the original structure of records must be preserved
				if (_shouldIncludeContinueRecords) {
					return record;
				}
				return null;
			}
			if (_lastRecord instanceof UnknownRecord) {
				//Gracefully handle records that we don't know about,
				//that happen to be continued
				return record;
			}
			if (_lastRecord instanceof EOFRecord) {
				// This is really odd, but excel still sometimes
				//  outputs a file like this all the same
				return record;
			}
			throw new RecordFormatException("Unhandled Continue Record followining " + _lastRecord.getClass());
		}
		_lastRecord = record;
		return record;
	}
/**
	 * @return the next available record, or <code>null</code> if
	 * this pass didn't return a record that's
	 * suitable for returning (eg was a continue record).
	 */
@return the next available record, or null if
this pass didn't return a record that's
suitable for returning .
@return the next available record or null if this pass didn ' t return a record that ' s suitable for returning .
private Record readNextRecord() {
		Record record = RecordFactory.createSingleRecord(_recStream);
		_lastRecordWasEOFLevelZero = false;
		if (record instanceof BOFRecord) {
			_bofDepth++;
			return record;
		}
		if (record instanceof EOFRecord) {
			_bofDepth--;
			if (_bofDepth < 1) {
				_lastRecordWasEOFLevelZero = true;
			}
			return record;
		}
		if (record instanceof DBCellRecord) {
			return null;
		}
		if (record instanceof RKRecord) {
			return RecordFactory.convertToNumberRecord((RKRecord) record);
		}
		if (record instanceof MulRKRecord) {
			Record[] records = RecordFactory.convertRKRecords((MulRKRecord) record);
			_unreadRecordBuffer = records;
			_unreadRecordIndex = 1;
			return records[0];
		}
		if (record.getSid() == ContinueRecord.sid) {
			if (_lastRecord instanceof ObjRecord || _lastRecord instanceof TextObjectRecord) {
				if (_shouldIncludeContinueRecords) {
					return record;
				}
				return null;
			}
			if (_lastRecord instanceof UnknownRecord) {
				return record;
			}
			if (_lastRecord instanceof EOFRecord) {
				return record;
			}
			throw new RecordFormatException("Unhandled Continue Record followining " + _lastRecord.getClass());
		}
		_lastRecord = record;
		return record;
	}
private Record readNextRecord ( ) { Record record = RecordFactory . createSingleRecord ( _recStream ) ; _lastRecordWasEOFLevelZero = false ; if ( record instanceof BOFRecord ) { _bofDepth ++ ; return record ; } if ( record instanceof EOFRecord ) { _bofDepth -- ; if ( _bofDepth < 1 ) { _lastRecordWasEOFLevelZero = true ; } return record ; } if ( record instanceof DBCellRecord ) { return null ; } if ( record instanceof RKRecord ) { return RecordFactory . convertToNumberRecord ( ( RKRecord ) record ) ; } if ( record instanceof MulRKRecord ) { Record [ ] records = RecordFactory . convertRKRecords ( ( MulRKRecord ) record ) ; _unreadRecordBuffer = records ; _unreadRecordIndex = 1 ; return records [ 0 ] ; } if ( record . getSid ( ) == ContinueRecord . sid ) { if ( _lastRecord instanceof ObjRecord || _lastRecord instanceof TextObjectRecord ) { if ( _shouldIncludeContinueRecords ) { return record ; } return null ; } if ( _lastRecord instanceof UnknownRecord ) { return record ; } if ( _lastRecord instanceof EOFRecord ) { return record ; } throw new RecordFormatException ( "Unhandled Continue Record followining " + _lastRecord . getClass ( ) ) ; } _lastRecord = record ; return record ; }
@return the next available record, or <code>null</code> if
 this pass didn't return a record that's
 suitable for returning (eg was a continue record).
@return the next available record or <code > null< / code > if this pass didn ' t return a record that ' s suitable for returning ( eg was a continue record ) .
// Not needed by POI.  Regenerated from scratch by POI when spreadsheet is written //we must remember the position of the continue record. //in the serialization procedure the original structure of records must be preserved //Gracefully handle records that we don't know about, //that happen to be continued // This is really odd, but excel still sometimes //  outputs a file like this all the same