text: public ChartSubstreamRecordAggregate(RecordStream rs) {_bofRec = (BOFRecord) rs.getNext();List<RecordBase> temp = new ArrayList<>();while (rs.peekNextClass() != EOFRecord.class) {if (PageSettingsBlock.isComponentRecord(rs.peekNextSid())) {if (_psBlock != null) {if (rs.peekNextSid() == HeaderFooterRecord.sid) {_psBlock.addLateHeaderFooter((HeaderFooterRecord)rs.getNext());continue;}throw new IllegalStateException("Found more than one PageSettingsBlock in chart sub-stream, had sid: " + rs.peekNextSid());}_psBlock = new PageSettingsBlock(rs);temp.add(_psBlock);continue;}temp.add(rs.getNext());}_recs = temp;org.apache.poi.hssf.record.Record eof = rs.getNext(); if (!(eof instanceof EOFRecord)) {throw new IllegalStateException("Bad chart EOF");}}